Depending on the platform different command may be available, below are the commands for AIX and SUN to find the shared libraries needed to run a binary. This may not show all the libraries needed as the application may be referenced in the code and dynamically loading them during different phases of execution of a program.
For AIX
# if the binary is 64bit one can use -X32_64 or -X64
/u01/app/oracle/bin $ dump -X32_64 -H oracle
oracle:
***Loader Section***
Loader Header Information
VERSION# #SYMtableENT #RELOCent LENidSTR
0x00000001 0x0000071e 0x00040902 0x000000e2
#IMPfilID OFFidSTR LENstrTBL OFFstrTBL
0x00000008 0x00413b28 0x000056a5 0x00413c0a
***Import File Strings***
INDEX PATH BASE MEMBER
0 /u01/app/oracle/rdbms/lib/:/u01/app/oracle/lib/:/usr/lib:/lib
1 libc.a shr_64.o
2 libpthreads.a shr_xpg5_64.o
3 libjox10.a shr.o
4 libdl.a shr_64.o
5 libperfstat.a shr_64.o
6 libodm.a shr_64.o
7 libc.a aio_64.o
For SUN (may be AIX depends on version).
$ cd $ORACLE_HOME
$ ldd oracle
oracle needs:
/usr/lib/libc.a(shr_64.o)
/usr/lib/libpthreads.a(shr_xpg5_64.o)
/u01/app/oracle/lib/libjox10.a(shr.o)
/usr/lib/libdl.a(shr_64.o)
/usr/lib/libperfstat.a(shr_64.o)
/usr/lib/libodm.a(shr_64.o)
/usr/lib/libc.a(aio_64.o)
/unix
/usr/lib/libcrypt.a(shr_64.o)
/usr/lib/libcfg.a(shr_64.o)
/usr/lib/liblvm.a(shr_64.o)