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

Unknown calling convention for ARM v9 binaries? #66

Closed
1 of 2 tasks
romansavrulin opened this issue Jan 13, 2020 · 6 comments
Closed
1 of 2 tasks

Unknown calling convention for ARM v9 binaries? #66

romansavrulin opened this issue Jan 13, 2020 · 6 comments

Comments

@romansavrulin
Copy link

romansavrulin commented Jan 13, 2020

Environment information

  • Operating System: OSX
  • Cutter version:
  • Obtained from:
    • [] Built from source
    • Downloaded from release
    • Distribution repository
  • File format: ELF

Describe the bug

I'm trying to analyze ARMv9 binary, compilled with arm-linux-gnueabihf-gcc and getting the following warnings in decompiler:

Unknown calling convention yet parameter storage is locked
[r2ghidra] Matching calling convention arm32 of function sym.imp.abort failed, args may be inaccurate.

I've tried different types of analysis and different types of architecture settings. The best result is achieved with automatic aaa preset

how can I provide Cutter with calling convention type or add support for ARM v9?

Screenshots

image

@ITAYC0HEN ITAYC0HEN transferred this issue from rizinorg/cutter Jan 13, 2020
@ITAYC0HEN
Copy link
Member

Thank you for letting us know!
I moved the issue to r2ghidra-dec repository since it's related to the plugin itself and not to Cutter.=

@romansavrulin
Copy link
Author

@ITAYC0HEN Can you point me how can I add support for this binaries?

@thestr4ng3r
Copy link
Member

I was looking for the place in the code (https://github.com/radareorg/r2ghidra-dec/blob/master/src/R2Architecture.cpp#L26) to show you how to fix it, but then accidentally fixed it myself 🙈

r2's arm32 cc maps to __stdcall in sleigh so I added that. It can still happen that you see incorrect function args, especially for imported functions, but that is better tracked in #73.

@romansavrulin
Copy link
Author

Nice! So how can I introduce this to my Cutter (Currently stable release)? Should I build from source or do you have some sort of nightly builds stream?

@thestr4ng3r
Copy link
Member

The best way is to build all from source, but a new release is scheduled soon too. There are no nightlies provided unfortunately.

@ITAYC0HEN
Copy link
Member

Unless you're on windows and then you can download the artifact from AppVeyor

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

No branches or pull requests

3 participants