fix: SIGSEGV in getauxval — override broken CRT stub with dlsym wrapper
compiler-rt's init_have_lse_atomics calls getauxval(AT_HWCAP) at library load time. The static getauxval from the CRT reads from __libc_auxv which is NULL in shared libraries → SIGSEGV at 0x0. Fix: compile getauxval_fix.c that provides a getauxval() which uses dlsym(RTLD_DEFAULT) to find the real bionic getauxval at runtime. Also switch to libc++_shared.so (bundled in APK) to avoid pulling in static libc stubs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
[target.aarch64-linux-android]
|
||||
linker = "aarch64-linux-android26-clang"
|
||||
rustflags = [
|
||||
"-C", "target-feature=-outline-atomics",
|
||||
"-C", "link-arg=-Wl,-z,lazy",
|
||||
]
|
||||
|
||||
[target.armv7-linux-androideabi]
|
||||
linker = "armv7a-linux-androideabi21-clang"
|
||||
linker = "armv7a-linux-androideabi26-clang"
|
||||
|
||||
Reference in New Issue
Block a user