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

[BUG] Cannot disassemble hello world aarch64 binary #48

Open
zyedidia opened this issue Jun 30, 2023 · 0 comments
Open

[BUG] Cannot disassemble hello world aarch64 binary #48

zyedidia opened this issue Jun 30, 2023 · 0 comments
Labels
analysis-needed This issue needs analysis and possible research to solve. bug Something isn't working

Comments

@zyedidia
Copy link

Example program:

#include <stdio.h>
int main() {
    printf("hello world\n");
    return 0;
}

Compiled with the following command (GCC 11.3.0)

$ aarch64-linux-gnu-gcc test.c -o a.out -static

Running retrowrite on the binary to disassemble produces an error:

$ retrowrite a.out out.s
Rewriting a.out into out.s
[*] Relocations for a section that's not loaded: .rela.plt
[INFO] Disassembling...
[INFO] Symbolizing...
[INFO] Recovering .eh_frame information
[CRITICAL] [x] Unhandled DWARF instruction: 7
[CRITICAL] [x] Unhandled DWARF instruction: 11
[CRITICAL] [x] Unhandled DWARF instruction: 11
[CRITICAL] [x] Unhandled DWARF instruction: 11
[CRITICAL] [x] Unhandled DWARF instruction: 11
[CRITICAL] [x] Unhandled DWARF instruction: 11
[CRITICAL] [x] Unhandled DWARF instruction: 11
[CRITICAL] [x] Unhandled DWARF instruction: 11
[CRITICAL] [x] Unhandled DWARF instruction: 11
[CRITICAL] [x] Unhandled DWARF instruction: 11
[CRITICAL] [x] Unhandled DWARF instruction: 11
[CRITICAL] [x] Unhandled DWARF instruction: 11
[CRITICAL] [x] Unhandled DWARF instruction: 11
[CRITICAL] [x] Unhandled DWARF instruction: 11
[CRITICAL] [x] Unhandled DWARF instruction: 11
[CRITICAL] [x] Unhandled DWARF instruction: 11
[CRITICAL] [x] Unhandled DWARF instruction: 11
[CRITICAL] [x] Unhandled DWARF instruction: 11
[CRITICAL] [x] Unhandled DWARF instruction: 11
[CRITICAL] [x] Unhandled DWARF instruction: 11
[CRITICAL] [x] Unhandled DWARF instruction: 8
[CRITICAL] [x] Unhandled DWARF instruction: 8
[CRITICAL] [x] Unhandled DWARF instruction: 8
[CRITICAL] [x] Unhandled DWARF instruction: 8
[CRITICAL] [x] Unhandled DWARF instruction: 8
[CRITICAL] [x] Unhandled DWARF instruction: 8
[CRITICAL] [x] Unhandled DWARF instruction: 8
[CRITICAL] [x] Unhandled DWARF instruction: 8
[CRITICAL] [x] Unhandled DWARF instruction: 8
[CRITICAL] [x] Unhandled DWARF instruction: 8
[CRITICAL] [x] Unhandled DWARF instruction: 8
[CRITICAL] [x] Unhandled DWARF instruction: 8
[CRITICAL] [x] Unhandled DWARF instruction: 8
[CRITICAL] [x] Unhandled DWARF instruction: 8
[CRITICAL] [x] Unhandled DWARF instruction: 8
[CRITICAL] [x] Unhandled DWARF instruction: 8
[CRITICAL] [x] Unhandled DWARF instruction: 8
[CRITICAL] [x] Unhandled DWARF instruction: 8
[CRITICAL] [x] Unhandled DWARF instruction: 8
[CRITICAL] [x] Unhandled DWARF instruction: 8
[CRITICAL] [x] Unhandled DWARF instruction: 11
[CRITICAL] [x] Unhandled DWARF instruction: 13
[CRITICAL] {'name': None, 'st_value': None, 'offset': 4788224, 'addend': 4284560, 'type': 1032}
[CRITICAL] [*] Unhandled relocation R_AARCH64_TLS_DTPMOD32
[CRITICAL] {'name': None, 'st_value': None, 'offset': 4788232, 'addend': 4285600, 'type': 1032}
[CRITICAL] [*] Unhandled relocation R_AARCH64_TLS_DTPMOD32
[CRITICAL] {'name': None, 'st_value': None, 'offset': 4788240, 'addend': 4427520, 'type': 1032}
[CRITICAL] [*] Unhandled relocation R_AARCH64_TLS_DTPMOD32
[CRITICAL] {'name': None, 'st_value': None, 'offset': 4788248, 'addend': 4284880, 'type': 1032}
[CRITICAL] [*] Unhandled relocation R_AARCH64_TLS_DTPMOD32
[CRITICAL] {'name': None, 'st_value': None, 'offset': 4788256, 'addend': 4281616, 'type': 1032}
[CRITICAL] [*] Unhandled relocation R_AARCH64_TLS_DTPMOD32
[CRITICAL] {'name': None, 'st_value': None, 'offset': 4788264, 'addend': 4427520, 'type': 1032}
[CRITICAL] [*] Unhandled relocation R_AARCH64_TLS_DTPMOD32
[CRITICAL] {'name': None, 'st_value': None, 'offset': 4788272, 'addend': 4281616, 'type': 1032}
[CRITICAL] [*] Unhandled relocation R_AARCH64_TLS_DTPMOD32
[CRITICAL] 40393c: bl #0x4002b0 - target outside code section!

Please let me know if I am doing something incorrect. Thanks!

@zyedidia zyedidia added analysis-needed This issue needs analysis and possible research to solve. bug Something isn't working labels Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analysis-needed This issue needs analysis and possible research to solve. bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant