Title: What shared libraries a program uses
Author: Sandro Tosi
Last modified: 2007-01-07
In order to debug some issues, it's interesting to know what shared
libraries a certain program is linked to. To find them, this is the
command to use:
$ ldd /full/path/to/executable
If you don't know the full-path, then you can try to use this:
$ ldd `which executable`
ldd will print out the list of shared libraries the executable is
linked to; for example:
$ ldd /bin/ls
linux-gate.so.1 => (0xffffe000)
librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xa7f28000)
libacl.so.1 => /lib/libacl.so.1 (0xa7f22000)
libselinux.so.1 => /lib/libselinux.so.1 (0xa7f0d000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xa7dd5000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xa7dc2000)
/lib/ld-linux.so.2 (0xa7f4d000)
libattr.so.1 => /lib/libattr.so.1 (0xa7dbd000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xa7db9000)
libsepol.so.1 => /lib/libsepol.so.1 (0xa7d79000)
where the value between parenthesis is the address of Dynamic Shared
Object (aka DSO) loaded from library.
|