mystikos icon indicating copy to clipboard operation
mystikos copied to clipboard

Musl loader doesn't support relocation type 37(R_X86_64_IRELATIV)

Open vtikoo opened this issue 1 year ago • 1 comments

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

vtikoo avatar Jun 26 '23 21:06 vtikoo

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.

anakrish avatar Jun 26 '23 21:06 anakrish