02.01.2025 23:17, Adam D. Barratt wrote:
The arm64 build keeps failing:
/usr/lib/gcc/aarch64-linux-gnu/12/../../../aarch64-linux-gnu/libc.a(init-first.o): in function `__libc_init_first': (.text+0x10): relocation truncated to fit: R_AARCH64_LD64_GOTPAGE_LO15 against symbol `__environ' defined in .bss section in /usr/lib/gcc/aarch64-linux-gnu/12/../../../aarch64-linux-gnu/libc.a(environ.o) /usr/bin/ld: (.text+0x10): warning: too many GOT entries for -fpic, please recompile with -fPIC collect2: error: ld returned 1 exit status
This is capstone built wrongly. Sigh. They build everything with -fPIC and use the same set of .o files for both the shared library and the static libcapstone.a. And aarch64 is the only platform (from the list of debian release architectures) where -fpic/-fpie (and their uppercase counterparts) makes a *big* difference. What triggered it is enablement of static-pie build in qemu, which is actually *required* to fix numerous crashes due to address space conflicts. So it is the change in qemu, but a required change - one of the most important changes in this upload. I'm debugging this now. At the very least, we can disable -lcapstone on aarch64 for the time being, - this wont affect the qemu functionality, but will make qemu debugging more difficult. So it's a 1:1 change actually, - with pie build there will be less reasons to debug qemu since it will crash less often, but actual debugging will be harder on aarch64. Thanks, /mjt