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

Retarget to aarch64 #268

Closed
sebpop opened this issue Apr 2, 2018 · 5 comments
Closed

Retarget to aarch64 #268

sebpop opened this issue Apr 2, 2018 · 5 comments

Comments

@sebpop
Copy link

sebpop commented Apr 2, 2018

I have read a related issue #9 of retargeting to x86-64.
Is somebody looking at retargeting retdec to aarch64?
I would appreciate any guidelines.

@PeterMatula
Copy link
Collaborator

Hi,
the current plan is as follows:

#115 was done in branch issue-115. I'm currently working on #116 in branch issue-116 - further changes to capstone2llvmir are done in this branch, so issue-115 was not merged to master but will be solved together with #116.

As for adding new architectures: usually the most work needs to be done in capstone2llvmir. But capstone2llvmir already implements both 32-bit and 64-bit translation of x86, MIPS, and PowerPC. So 64-bit support for these does not require writing new translators - only some relatively minor changes in other parts of RetDec.

It is different for 64-bit ARM (aarch64) - Capstone has different modules for 32-bit and 64-bit ARM (different to x86/MIPS/PowePC modules) and our current translator translates only 32-bit module. To support 64-bit, a new translator needs to be implemented. If you are interested, take a look at implementation of 32-bit ARM translator (and other translators) in capstone2llvmir - 64-bit ARM translator would look similar to this. I recommend looking at implementation in issue-116 branch, as it has clearer API design than the one in master - however, keep in mind that the decoder in this branch is work in progress, so decompilation in this branch is not working yet.

If you are interested, you can help us by writing a 64-bit ARM translator, but I would wait for issue-116 to be merged to master, since capstone2llvmir API will definitely change. It is possible to develop and test (unit tests) new capstone2llvmir modules without knowledge of any other RetDec modules - so you don't need to study an entire and quite complex RetDec infrastucture.

@PeterMatula
Copy link
Collaborator

This is being worked on by one student as his bachelor thesis - see milestone and the referenced forked repository.

@TheDiamondPicks
Copy link

Any updates regarding this?

@PeterMatula
Copy link
Collaborator

The same as before. A student is working on it. Bachelor theses are due sometimes in may, so there should be some tangible results by then.

@PeterMatula
Copy link
Collaborator

Added to master in 3905f47.
We will not make a new release right away:

  1. The support is experimental. When more people start to use it, they are likely to encounter some bugs we will have to fix.
  2. There are more things we would like to have in the next release.

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

3 participants