How can tell what shared libraries a binary is linked with?

How can tell what shared libraries a binary is linked with?

Use "dump -H " and see if anything other than /unix is
listed in the loader section (at the bottom). The first example is
/bin/sh (statically linked) and the second example is
/usr/local/bin/bash (shared).

INDEX PATH BASE MEMBER
0 /usr/lib:/lib
1 / unix

INDEX PATH BASE MEMBER
0 ./lib/readline/:./lib/glob/:/usr/lib:/lib
1 libc.a shr.o
2 libcurses.a shr.o

The freeware tool "ldd" lists all the shared libraries needed
by an executable, including those recursively included by other
shared libraries. See question 2.27 "Where can I find ldd for AIX?".



Home FAQ