1999-08-28 23:23:38 +00:00
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2008-05-15 10:43:11 +00:00
|
|
|
.Dd May 15, 2008
|
1993-11-03 23:41:59 +00:00
|
|
|
.Dt LDD 1
|
2001-07-10 14:16:33 +00:00
|
|
|
.Os
|
1993-11-03 23:41:59 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm ldd
|
|
|
|
.Nd list dynamic object dependencies
|
|
|
|
.Sh SYNOPSIS
|
2000-11-20 19:21:22 +00:00
|
|
|
.Nm
|
2002-02-17 07:04:32 +00:00
|
|
|
.Op Fl a
|
1996-10-01 02:16:16 +00:00
|
|
|
.Op Fl v
|
1996-11-30 16:12:46 +00:00
|
|
|
.Op Fl f Ar format
|
1996-10-01 01:34:32 +00:00
|
|
|
.Ar program ...
|
1993-11-03 23:41:59 +00:00
|
|
|
.Sh DESCRIPTION
|
2002-04-20 12:18:28 +00:00
|
|
|
The
|
2000-05-10 15:46:27 +00:00
|
|
|
.Nm
|
2002-04-20 12:18:28 +00:00
|
|
|
utility displays all shared objects that are needed to run the given program or
|
2002-02-04 10:33:48 +00:00
|
|
|
to load the given shared object.
|
2000-05-10 15:46:27 +00:00
|
|
|
Contrary to
|
|
|
|
.Xr nm 1 ,
|
|
|
|
the list includes
|
1993-11-03 23:41:59 +00:00
|
|
|
.Dq indirect
|
1997-08-30 12:22:49 +00:00
|
|
|
dependencies that are the result of needed shared objects which themselves
|
1993-11-03 23:41:59 +00:00
|
|
|
depend on yet other shared objects.
|
1996-10-01 01:34:32 +00:00
|
|
|
.Pp
|
|
|
|
Zero, one or two
|
|
|
|
.Fl f
|
2000-03-01 12:20:22 +00:00
|
|
|
options may be given.
|
|
|
|
The argument is a format string passed to
|
1996-10-01 01:34:32 +00:00
|
|
|
.Xr rtld 1
|
|
|
|
and allows customization of
|
2000-05-10 15:46:27 +00:00
|
|
|
.Nm Ns 's
|
2000-03-01 12:20:22 +00:00
|
|
|
output.
|
2007-05-12 12:23:40 +00:00
|
|
|
If one is given, it sets
|
|
|
|
.Ev LD_TRACE_LOADED_OBJECTS_FMT1 .
|
|
|
|
If two are given, they set
|
|
|
|
.Ev LD_TRACE_LOADED_OBJECTS_FMT1
|
|
|
|
and
|
|
|
|
.Ev LD_TRACE_LOADED_OBJECTS_FMT2 ,
|
|
|
|
respectively.
|
2000-03-01 12:20:22 +00:00
|
|
|
See
|
1996-10-01 01:34:32 +00:00
|
|
|
.Xr rtld 1
|
2007-05-12 12:23:40 +00:00
|
|
|
for details, including a list of recognized conversion characters.
|
1996-10-01 02:16:16 +00:00
|
|
|
.Pp
|
|
|
|
The
|
2002-02-17 07:04:32 +00:00
|
|
|
.Fl a
|
|
|
|
option displays the list of all objects that are needed by each loaded
|
2002-03-15 15:31:54 +00:00
|
|
|
object.
|
|
|
|
This option does not work with
|
2002-02-17 07:04:32 +00:00
|
|
|
.Xr a.out 5
|
|
|
|
binaries.
|
|
|
|
.Pp
|
|
|
|
The
|
1996-10-01 02:16:16 +00:00
|
|
|
.Fl v
|
2002-12-30 21:18:15 +00:00
|
|
|
option displays a verbose listing of the dynamic linking headers
|
2002-03-15 15:31:54 +00:00
|
|
|
encoded in the executable.
|
|
|
|
See the source code and include
|
1996-10-01 02:16:16 +00:00
|
|
|
files for the definitive meaning of all the fields.
|
2008-05-15 10:43:11 +00:00
|
|
|
.Sh EXAMPLES
|
|
|
|
The following is an example of a shell pipeline which uses the
|
|
|
|
.Fl f
|
|
|
|
option.
|
|
|
|
It will print a report of all ELF binaries in the current directory,
|
|
|
|
which link against libc.so.6:
|
2009-11-28 11:05:22 +00:00
|
|
|
.Dl "find . -type f | xargs -n1 file -F ' ' | grep ELF | cut -f1 -d' ' | xargs ldd -f '%A %o\en' | grep libc.so.6"
|
1993-11-03 23:41:59 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr ld 1 ,
|
2000-03-28 09:01:04 +00:00
|
|
|
.Xr nm 1 ,
|
|
|
|
.Xr rtld 1
|
1993-11-03 23:41:59 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
A
|
2000-05-10 15:46:27 +00:00
|
|
|
.Nm
|
|
|
|
utility first appeared in SunOS 4.0, it appeared in its current form in
|
|
|
|
.Fx 1.1 .
|
1996-10-01 02:16:16 +00:00
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Fl v
|
2000-05-10 15:46:27 +00:00
|
|
|
support is based on code written by
|
|
|
|
.An John Polstra Aq jdp@polstra.com
|