mystikos
mystikos copied to clipboard
Musl loader doesn't support relocation type 37(R_X86_64_IRELATIV)
When running numpy core tests, dynamically loading ld-linux fails with -
Error relocating /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2: unsupported relocation type 37
Version info -
$strings appdir/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 | grep version | grep '[0-9]'
ld.so (Debian GLIBC 2.36-9) stable release version 2.36.
Erring relocation entry -
$readelf --relocs appdir/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
Relocation section '.rela.dyn' at offset 0xcc8:
Offset Info Type Sym. Value Sym. Name + Addend
0000000309e0 000000000025 R_X86_64_IRELATIV 16540
This is unfortunate. Implementing the relocations ourselves (as you have done) seems to be the only possible approach other than detecting and erroring out early as we do currently.