HP-UX Reference (11i v2 03/08) - 1 User Commands A-M (vol 1)

l
ldd(1) ldd(1)
ldd returns zero when the operation is successful. A non-zero return code indicates that an error
occurred.
EXAMPLES
By default
ldd prints a simple dynamic path information. This consists of the dependencies recorded in
the executable (or the shared library) followed by the physical location where these libraries are found.
ldd a.out
./libx.so => ./libx.so
libc.so => /usr/lib/hpux32/libc.so.1
libdl.so => /usr/lib/hpux32/libdl.so.1
The -v option causes ldd to print dependency relationship along with the dynamic path information.
ldd -v a.out
find library=./libx.so; required by a.out
./libx.so => ./libx.so
find library=libc.so; required by a.out
libc.so => /usr/lib/hpux32/libc.so.1
find library=libdl.so; required by /usr/lib/hpux32/libc.so.1
libdl.so => /usr/lib/hpux32/libdl.so..1
The -r option to ldd causes it to analyze all symbol references and print information about unsatisfied
code and data symbols.
ldd -r a.out
./libx.so => ./libx.so
libc.so => /usr/lib/hpux32/libc.so.1
libdl.so => /usr/lib/hpux32/libdl.so.1
symbol not found: val1 (./libx.so)
symbol not found: count (./libx.so)
symbol not found: func1 (./libx.so)
WARNINGS
ldd does not list shared libraries explicitly loaded using dlopen(3C) or shl_load(3X).
FILES
a.out output file
/usr/lib/hpux32/dld.so
32-bit Itanium(R)-based system dynamic loader
/usr/lib/hpux64/dld.so
64-bit Itanium-based system dynamic loader
/usr/ccs/lib/hpux32/lddstub
32-bit dummy executable loaded to check the dependencies
of shared libraries
/usr/ccs/lib/hpux64/lddstub
64-bit dummy executable loaded to check the dependencies
of shared libraries
/usr/lib/nls/$LANG/ldd.cat message catalog
SEE ALSO
System Tools
ld(1) invoke the link editor
Miscellaneous
a.out(4) assembler, compiler, and linker output
dld.so(5) dynamic loader
Texts and Tutorials
HP-UX Linker and Libraries User’s Guide
Section 1450 Hewlett-Packard Company 2 HP-UX 11i Version 2: August 2003