HP-UX Reference (11i v1 00/12) - 1 User Commands A-M (vol 1)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1/!!!intro.1
________________________________________________________________
___ ___
l
ldd(1) ldd(1)
DIAGNOSTICS
ldd prints the record of shared library path names to stdout. The optional list of symbol resolution prob-
lems are printed to stderr.
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.sl => ./libx.sl
libc.2 => /lib/pa20_64/libc.2
libdl.1 => /lib/pa20_64/libdl.1
The -v option causes ldd to print dependency relationship along with the dynamic path information.
ldd -v a.out
find library=./libx.sl; required by a.out
./libx.sl => ./libx.sl
find library=libc.2; required by a.out
libc.2 => /lib/pa20_64/libc.2
find library=libdl.1; required by /lib/pa20_64/libc.2
libdl.1 => /lib/pa20_64/libdl.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.sl => ./libx.sl
libc.2 => /lib/pa20_64/libc.2
libdl.1 => /lib/pa20_64/libdl.1
symbol not found: val1 (./libx.sl)
symbol not found: count (./libx.sl)
symbol not found: func1 (./libx.sl)
WARNINGS
ldd does not list shared libraries explicitly loaded using dlopen(3C) or shl_load(3X).
FILES
a.out output file
/usr/lib/dld.sl 32-bit PARISC dynamic loader
/usr/lib/pa20_64/dld.sl
64-bit PARISC dynamic loader
/usr/ccs/lib/lddstub 32-bit dummy executable loaded to check the dependencies
of shared libraries
/usr/ccs/lib/pa20_64/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.sl(5) dynamic loader
Texts and Tutorials:
HP-UX Linker and Libraries User’s Guide
HP-UX Release 11i: December 2000 2 Section 1441
___
___