ldd(1)

ldd(1)

DIAGNOSTICS

ldd prints the record of shared library path names to stdout. The optional list of symbol resolution problems 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 -voption 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 -roption to ldd causes it to analyze all symbol references and print information about unsatis®ed 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

 

output ®le

a.out

 

/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

l

HP-UX Release 11i: December 2000

− 2 −

Section 1441