ldd doesn't work on dynamically linked binary

后端 未结 2 1619
轻奢々
轻奢々 2020-12-30 04:49

I have a binary that uses a bunch of .so files.

bash-3.00$ file foo
foo: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.21, dyna         


        
相关标签:
2条回答
  • 2020-12-30 04:58

    Note that in Fedora 21, to get ldd to identify 32bit .so files, I had to install the following:

    sudo yum install glibc.i686 libgcc.i686 libstdc++.i686 glibc-devel.i686
    

    I'm not sure which one of those fixed the "not a dynamic executable" error I was seeing in ldd.

    0 讨论(0)
  • 2020-12-30 05:06

    Like one of the comment says - you tried using ldd on 64 bit system to inspect a 32-bit ELF object. ldd uses the standard dynamic linker to trace the dependencies, so if your platform doesn't have the linker required by the ELF object being inspected, ldd fails. Readelf and objdump are more robust in these situations.

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