Linux binary executable properties: ldd alternative

librarieslinux

The Linux ldd command can show the dynamic libraries used by an executable. It's a bash script.
But it seems to be fragile, and does not work on some binaries. Is there an alternative tool?

In my specific example, I can use:

% file datab2txt

datab2txt: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, for GNU/Linux 2.4.0, not stripped

but ldd fails with:

% ldd -v datab2txt

not a dynamic executable

Best Answer

You could also do:

readelf -d executable | grep NEEDED

But this probably doesn't do what you want. It shows the libs that executable links to, but not all the libs it needs (a library can require another library).

Related Question