-
Notifications
You must be signed in to change notification settings - Fork 951
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
Support for decompilation of 64-bit x86 files? #9
Comments
Hi, When adding a new architecture, most of the work needs to be done in So, what needs to be done to enable x86-64:
We would like to get to it pretty soon, but before that, some refactorizations are in order:
|
I have been asked what changes did I make in order to try x86-64 decompilation. Instead of listing them somewhere, I decided to create a branch where it is enabled. So if anyone wants to play with it, here you go. I was able to decompile the simplest hello world program (hello-x86_64.zip). You can see in the Keep in mind, that everything I wrote above still holds. This does not mean RetDec supports x86-64, or anything like that. All I did was let these files go through scripts into decompilation (commit). Much more work will be needed to properly support this. Please do not report any issues related to this. But if while you are playing with it you fix/improve something, feel free to contribute. |
Guys hows it coming along? when do you think it will be done? |
+1 on this. Given the majority of binaries are 64-bit now (especially linux elfs), not having 64bit decompilation support is a major issue for usability. |
I changed this issue to be specific to 64-bit x86 (x64), since this architecture was mainly discussed here, and it is better to have this separated from issues dealing with 64-bit support of other architectures (e.g. #268). |
This is being worked on by one student as his bachelor thesis - see milestone and the referenced forked repository. |
@PeterMatula I've updated the Python-based replacement of the shell script with similar changes and tested it. I haven't had any x86-64 issues with the decompiler (yet). As it's been a long time since your x86_64-enabled branch was updated, it was a huge merge with master + the Python change and I opted to make a different branch you could pull the changes yourself in x86-64-support |
@jonahharris This will let x64 files go through, and RetDec will probably generate some output, but as I wrote above, the output is not very good. What the mentioned student is doing at the moment:
The thesis is due at the end of summer semester 2019 (may), but i hope we will merge parts of it much sooner - and enable an experimental support for x64. |
After #513, RetDec has a basic support of 64-bit x86 architecture. Moreover, function parameter & return analysis, ABI, and other related modules, were completely rewritten - this should improve quality for other architectures as well. Big thanks to Peter Kubov (@xkubov).
I'm closing this, since basic x64 support have been added. We are aware of many more issues we need to fix/implement in order to improve x64 decompilation quality, but these can be solved in dedicated issues and not here. |
Since this question is going to get asked sooner or later, might as well ask it now: what needs to implemented for 64-bit support?
llvmir2hll was able to decompile a simple hello world LLVM IR file compiled by a 64-bit Linux and macOS host. I didn't test anything complex or McSema (which someone should definitely try and let us know!).
Is bin2llvmir the main road block?
The text was updated successfully, but these errors were encountered: