Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve decompilation of object files #201

Open
PeterMatula opened this issue Feb 7, 2018 · 2 comments
Open

Improve decompilation of object files #201

PeterMatula opened this issue Feb 7, 2018 · 2 comments

Comments

@PeterMatula
Copy link
Collaborator

Right now, we have problems with decompilation of object files. Here are a few binaries, that we could use to identify problems, and use them in regression tests once the problems are fixed: bins.zip.

@metthal
Copy link
Member

metthal commented Feb 8, 2018

The problem mainly lies in the fact that imported symbols have their address set to 0. Example from x86:

0x62:   c7 04 24 b8 00 00 00   mov dword [ esp ], 0xb8 ; "Hello World!" 
0x69:   e8 00 00 00 00         call 0x6e <function_6e> ; Address of function: _foo

You can see that CALL instruction with operand 0. This 0 is intermediate value and can be fixed with relocations if we assign some virtual fake address to symbol foo. It would be the best to create one additional segment in loader and pair addresses from this segment with symbols.

Here, I attach some files from our internal bug tracker which I made.

hello.zip

@PeterMatula
Copy link
Collaborator Author

#577 solved problems with ELF object files. Tests added in avast/retdec-regression-tests@9f0af1b. COFF object files are still not OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants