ldd_pa(1) ldd_pa(1)
For PA-RISC Systems
NAME [Toc] [Back]
ldd_pa: ldd - list dynamic dependencies of executable files or shared
libraries
SYNOPSIS [Toc] [Back]
ldd [-b] [-d] [-r] [-s] [-v] filename...
DESCRIPTION [Toc] [Back]
ldd is a command that can list the dynamic dependencies of incomplete
executable files or shared libraries.
ldd lists verbose information about dynamic dependencies and symbol
references. If the object file is an executable file, ldd lists all
shared libraries that would be loaded as a result of executing the
file. If it is a shared library, ldd lists all shared libraries that
would be loaded as a result of loading the library.
ldd uses the same algorithm as the dynamic loader (/usr/lib/dld.sl and
/usr/lib/pa20_64/dld.sl) to locate the shared libraries. See PA-RISC
32-bit Dynamic Path List, PA-RISC 64-bit Dynamic Path List, and The
LD_PRELOAD Environment Variable sections in dld.sl(5) for more
information.
Options [Toc] [Back]
ldd recognizes the following options:
-b PA-RISC 32-bit only. Used in conjunction with -d and/or -r
to force dld.sl to bind all dependent libraries and report
unsats. By default the smartbind mechanism in dld.sl only
binds libraries whose symbols are explicitly referenced.
-d Check reference to data symbols.
-r Check reference to data and code symbols.
-s Display the search path used to locate the shared libraries.
-v Display all dependency relationships.
EXTERNAL INFLUENCES [Toc] [Back]
Environment Variables
ldd uses the following environment variables to locate shared
libraries.
LD_LIBRARY_PATH [Toc] [Back]
PA-RISC 64-bit mode: A colon-separated list of path names which
defines the search path for shared libraries at runtime. See
PA-RISC 64-bit Dynamic Path List in dld.sl(5) for more
information.
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: Sep 2004
ldd_pa(1) ldd_pa(1)
For PA-RISC Systems
LD_PRELOAD [Toc] [Back]
A colon-separated or space-separated list of libraries which the
dynamic loader implicitly loads first at runtime. See The
LD_PRELOAD Environment Variable in dld.sl(5) for more
information.
SHLIB_PATH [Toc] [Back]
A colon-separated list of path names which defines the search
path for shared libraries at runtime. See PA-RISC 32-bit Dynamic
Path List and PA-RISC 64-bit Dynamic Path List in dld.sl(5) for
more information.
The following internationalization variables affect the execution of
ldd:
LANG Determines the locale category for native language, local customs
and coded character set in the absence of LC_ALL and other LC_*
environment variables. If LANG is not specified or is set to the
empty string, a default of C (see lang(5)) is used instead of
LANG.
LC_ALL [Toc] [Back]
Determines the values for all locale categories and has
precedence over LANG and other LC_* environment variables.
LC_MESSAGES [Toc] [Back]
Determines the locale that should be used to affect the format
and contents of diagnostic messages written to standard error.
LC_NUMERIC [Toc] [Back]
Determines the locale category for numeric formatting.
LC_CTYPE [Toc] [Back]
Determines the locale category for character handling functions.
NLSPATH [Toc] [Back]
Determines the location of message catalogs for the processing of
LC_MESSAGES.
If any internationalization variable contains an invalid setting, ldd
behaves as if all internationalization variables are set to C. See
environ(5).
DIAGNOSTICS [Toc] [Back]
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.
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: Sep 2004
ldd_pa(1) ldd_pa(1)
For PA-RISC Systems
EXAMPLES [Toc] [Back]
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 causes ldd 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)
The -s option causes ldd to print the dynamic search path lists used
to load the libraries in the order that the path lists are referenced:
$ export SHLIB_PATH=/tmp
$ export LD_LIBRARY_PATH=/var/tmp:/var/adm
$ ldd -s a.out
find library=./libx.sl; required by a.out
./libx.sl => ./libx.sl
find library=libc.2; required by a.out
search path=/var/tmp:/var/adm (LD_LIBRARY_PATH)
trying path=/var/tmp/libc.2
trying path=/var/adm/libc.2
search path=/tmp (SHLIB_PATH)
trying path=/tmp/libc.2
search path=/usr/lib/pa20_64:/opt/langtools/lib/pa20_64: (RPATH)
trying path=/usr/lib/pa20_64/libc.2
Hewlett-Packard Company - 3 - HP-UX 11i Version 2: Sep 2004
ldd_pa(1) ldd_pa(1)
For PA-RISC Systems
libc.2 => /usr/lib/pa20_64/libc.2
find library=libdl.1; required by /usr/lib/pa20_64/libc.2
search path=/var/tmp:/var/adm (LD_LIBRARY_PATH)
trying path=/var/tmp/libdl.1
trying path=/var/adm/libdl.1
search path=/tmp (SHLIB_PATH )
trying path=/tmp/libdl.1
search path=/usr/lib/pa20_64 (RPATH)
trying path=/usr/lib/pa20_64/libdl.1
libdl.1 => /usr/lib/pa20_64/libdl.1
WARNINGS [Toc] [Back]
ldd does not list shared libraries explicitly loaded using dlopen(3C)
or shl_load(3X).
FILES [Toc] [Back]
a.out output file
/usr/lib/dld.sl 32-bit PA-RISC dynamic loader
/usr/lib/pa20_64/dld.sl 64-bit PA-RISC 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 [Toc] [Back]
System Tools
ld(1) invoke the link editor
Miscellaneous [Toc] [Back]
a.out(4) assembler, compiler, and linker output
dld.sl(5) PA-RISC dynamic loader
Texts and Tutorials [Toc] [Back]
HP-UX Linker and Libraries User's Guide
Hewlett-Packard Company - 4 - HP-UX 11i Version 2: Sep 2004 [ Back ] |