Finding out what libraries are needed for an executable

Is there an easy way to find out what DLLs an executable wants, without
actually trying to run it?

Kevin Miller wrote:

Is there an easy way to find out what DLLs an executable wants, without
actually trying to run it?

ldd?

$ ldd which gdb
/usr/bin/gdb:
libm.so.2 => /lib/libm.so.2 (0xb8200000)
libsocket.so.2 => /lib/libsocket.so.2 (0xb821c000)
libc.so.2 => /usr/lib/ldqnx.so.2 (0xb0300000)

Kevin Miller wrote:

Is there an easy way to find out what DLLs an executable wants, without
actually trying to run it?

objdump -x | grep NEEDED


–Armin