Closed cme closed 3 months ago
Some further digging shows that the code at the higher addresses is indeed the same x86 code as the linked binary, at different page addresses, so it certainly looks like ASLR of some sort.
I tried adding -Wl,--disable-dynamicbase -Wl,--disable-high-entropy-va
linker flags and then backtrace info returns normal:
So I guess it is ASLR.
I've created a patch series at https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608031.html which solves this issue.
The patch series was committed, so this should be fixed.
I'm trying to get backtrace information for x86_64 executables on Windows, but the only Windows development environment I can really use to test this at the moment is Windows Insider Preview for AArch64 (running on an AArch64 Mac). It's an odd environment so there could be multiple reasons for this.
Some initial digging shows that
libbacktrace
is getting the same symbol addresses visible inobjdump
, but at run-time the function addresses are at higher memory locations.Address space layout randomisation? x86 emulation?