mystikos icon indicating copy to clipboard operation
mystikos copied to clipboard

Missing symbols while relocating libstdc++.so.6 3.4.30 and libgcc_s.so.1

Open vtikoo opened this issue 1 year ago • 2 comments

While running numpy_core_tests, following symbols are missing -

$readelf --relocs appdir/usr/lib/x86_64-linux-gnu/libgcc_s.so.1 | grep dl_find_object 00000001f108 000e00000007 R_X86_64_JUMP_SLO 0000000000000000 _dl_find_object@GLIBC_2.35 + 0 $readelf --relocs appdir/usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep arc4random 000000214150 000900000007 R_X86_64_JUMP_SLO 0000000000000000 arc4random@GLIBC_2.36 + 0 $readelf --relocs appdir/usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep libc_ 000000213298 003000000006 R_X86_64_GLOB_DAT 0000000000000000 __libc_single_threaded@GLIBC_2.32 + 0

arc4random can be mitigated by runtime interpositioning libbsddev.

All these symbols are part of glibc shared object file -

 $strings appdir/usr/lib/x86_64-linux-gnu/libc.so.6 | grep _dl_find_object
_dl_find_object
$strings appdir/usr/lib/x86_64-linux-gnu/libc.so.6 | grep arc4random
arc4random_uniform
arc4random_buf
arc4random
Fatal glibc error: cannot get entropy for arc4random
$strings appdir/usr/lib/x86_64-linux-gnu/libc.so.6 | grep __libc_single_threaded
__libc_single_threaded

libstdc++ version information -

$strings appdir/usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep LIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28
GLIBCXX_3.4.29
GLIBCXX_3.4.30
GLIBCXX_DEBUG_MESSAGE_LENGTH

libgcc_s version information -

$strings appdir/usr/lib/x86_64-linux-gnu/libgcc_s.so.1 | grep GCC
GCC_3.0
GCC_3.3
GCC_3.3.1
GCC_3.4
GCC_3.4.2
GCC_3.4.4
GCC_4.0.0
GCC_4.2.0
GCC_4.3.0
GCC_4.7.0
GCC_4.8.0
GCC_7.0.0
GCC_12.0.0

vtikoo avatar Jun 26 '23 16:06 vtikoo

@radhikaj we are hitting this for .net 8 too. This seems like a musl C vs glibc difference. We could check if newer musl versions support this (I couldn't find anything promising from my cursory search). Or implement these symbols in musl ourselves.

vtikoo avatar Jun 17 '24 01:06 vtikoo