How can I find which ELF dependency is not fulfilled?

后端 未结 1 1566
礼貌的吻别
礼貌的吻别 2020-12-11 01:34

I\'ve built a test ELF program using the LSB SDK (note that my question is not specific to LSB):

$ /opt/lsb/bin/lsbcc tst.c
$ ls -l a.out 
-rwxr-xr-         


        
相关标签:
1条回答
  • 2020-12-11 02:13

    This looks like what happens when the ELF interpreter is missing.

    Ensure that /lib/ld-lsb.so.2 (or similar; varies by LSB version and architecture) exists. ldd and readelf -l will be able to show the ELF interpreter your executable is requesting.

    (lsbcc (or something in the LSB toolchain) overrides the system's default /lib/ld-linux.so.2, probably by passing -Wl,--dynamic-linker=/lib/ld-lsb.so.2 to the compiler, for reasons I think are rather silly (Glibc has always provided fairly excellent backwards-compatibility here), but there you have it.)

    0 讨论(0)
提交回复
热议问题