Skip to content

[BUG] Cannot re-compile hello world aarch64 binary #53

@M4ndUwU

Description

@M4ndUwU

Describe the bug
When I run the instrumentation pass, the link step fails with undefined references to the AFL runtime symbols:

/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: /tmp/ccEu0nM0.o: in function `myarea':
(.afl_sec+0x3): undefined reference to `__afl_area_ptr'
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: /tmp/ccEu0nM0.o: in function `myprev_loc':
(.afl_sec+0xb): undefined reference to `__afl_prev_loc'
collect2: error: ld returned 1 exit status

Describe how to reproduce the bug

  1. Platform: ARM64 (aarch64)
  2. Compiler: aarch64-linux-gnu-g++ (GCC 11), targeting aarch64 Android coverage.
  3. Code: a minimal test binary (test_bin)
  4. OS / Environment: Ubuntu 20.04 x64

Recompilation

# 1) generate an Android-coverage-instrumented .s
./retrowrite -m android_coverage test_bin test_bin.s   # succeeds

# 2) apply the analysis pass
./retrowrite -a test_bin.s test_bin_inst              # fails with undefined reference errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    analysis-neededThis issue needs analysis and possible research to solve.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions