文件已打开,但“没有此类文件或目录”

时间:2018-12-05 12:13:42

标签: linux arm cross-platform dlopen lib

文件是libxxx.soARM hf 32的共享对象WindRiver 2.6.32。我有ARM 32 hf debian wheezy 3.0.2

当我执行已编译的二进制文件hello时,我在此lib上使用strace调用dlopen时,它将打开,首先读取512字节的elf头,然后读取1400字节的内容,然后读取49读取字节ARM.attributes节,然后读取write error... cant open shared object : no such file or dirrectory

何处出现此错误?

跟踪:

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
write(2, "dlopen() error: /usr/src/hello/l"..., 107dlopen() error: /usr/src/hello/libxxx.so: cannot open shared object file: No such file or directory 0) = 107

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

0 个答案:

没有答案