Пытаюсь использовать функцию из libxxx.so, взятой из Windriver arm hf 2.6.32. Эмулирую на qemu Debian wheezy hf 3.2.0. Скомпилив простейший бинарник hello, где вызываю dlopen на libxxx.so, получаю ошибку «cannot open shared object file: No such file or dirrectory”. Хотя:
strace:
open("/usr/src/hello/libxxx.so", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\330\26\0\0004\0\0\0"..., 512) = 512
lseek(3, 53056, SEEK_SET) = 53056
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1400) = 1400
lseek(3, 37784, SEEK_SET) = 37784
read(3, "A0\0\0\0aeabi\0\1&\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\4\22"..., 49) = 49
close(3) = 0
writev(2, [{"./hello", 7}, {": ", 2}, {"error while loading shared libra"..., 36}, {": ", 2}, {"libxxx.so", 13}, {": ", 2}, {"cannot open shared object file", 30}, {": ", 2}, {"No such file or directory", 25}, {"\n", 1}], 10./hello: error while loading shared libraries: libxxx.so: cannot open shared object file: No such file or directory
) = 120
exit_group(127)
# file libxxx.so:
ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped
# uname -a:
Linux debian-armhf 3.2.0-4-vexpress #1 SMP Debian 3.2.51-1 armv7l GNU/Linux
# file hello:
ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26
# ldd hello : libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76ee9000) libxxx.so => not found libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76e01000) /lib/ld-linux-armhf.so.3
# ldconfig -p | grep libxxx.so : libxxx.so (libc6) => /lib/libxxx.so (it's not a link)
# ldd libxxx.so : not a dynamic executable
readelf говорит, что для libxxx.so NEEDED только libc. Секцию ARM.attributes смотрел, сверял с родными либами...