ldd(1) can be used to display the shared libraries that a program (or a shared library) requires to run:
$ ldd prog libdemo.so.1 => /usr/lib/libdemo.so.1 (0x40019000) libc.so.6 => /lib/libc.so.6 (0x4017b000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
For most ELF executables, ldd will list entries for at least
ld-linux.so.n,
the dynamic linker, and
libc.so.n,
the standard C library.
(C) 2006, Michael Kerrisk