]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/ldd/ldd.1
On 64 bit architectures, you can run 32 bit executables and the rtld can trace them...
[FreeBSD/FreeBSD.git] / usr.bin / ldd / ldd.1
1 .\" $FreeBSD$
2 .\"
3 .Dd May 15, 2008
4 .Dt LDD 1
5 .Os
6 .Sh NAME
7 .Nm ldd
8 .Nd list dynamic object dependencies
9 .Sh SYNOPSIS
10 .Nm
11 .Op Fl a
12 .Op Fl v
13 .Op Fl f Ar format
14 .Ar program ...
15 .Sh DESCRIPTION
16 The
17 .Nm
18 utility displays all shared objects that are needed to run the given program or
19 to load the given shared object.
20 Contrary to
21 .Xr nm 1 ,
22 the list includes
23 .Dq indirect
24 dependencies that are the result of needed shared objects which themselves
25 depend on yet other shared objects.
26 .Pp
27 Zero, one or two
28 .Fl f
29 options may be given.
30 The argument is a format string passed to
31 .Xr rtld 1
32 and allows customization of
33 .Nm Ns 's
34 output.
35 If one is given, it sets
36 .Ev LD_TRACE_LOADED_OBJECTS_FMT1 .
37 If two are given, they set
38 .Ev LD_TRACE_LOADED_OBJECTS_FMT1
39 and
40 .Ev LD_TRACE_LOADED_OBJECTS_FMT2 ,
41 respectively.
42 See
43 .Xr rtld 1
44 for details, including a list of recognized conversion characters.
45 .Pp
46 The
47 .Fl a
48 option displays the list of all objects that are needed by each loaded
49 object.
50 This option does not work with
51 .Xr a.out 5
52 binaries.
53 .Pp
54 The
55 .Fl v
56 option displays a verbose listing of the dynamic linking headers
57 encoded in the executable.
58 See the source code and include
59 files for the definitive meaning of all the fields.
60 .Sh EXAMPLES
61 The following is an example of a shell pipeline which uses the
62 .Fl f
63 option.
64 It will print a report of all ELF binaries in the current directory,
65 which link against libc.so.6:
66 .Dl "find . -type f | xargs -n1 file -F " " | grep ELF | cut -f1 -d' ' | xargs ldd -f '%A %o\en' | grep libc.so.6"
67 .Sh BUGS
68 On 64 bit architectures, dlopen() cannot open 32 bit dynamic libraries,
69 so
70 .Nm
71 will show the error
72 .Qq "unsupported file layout" .
73 .Sh SEE ALSO
74 .Xr ld 1 ,
75 .Xr nm 1 ,
76 .Xr rtld 1
77 .Sh HISTORY
78 A
79 .Nm
80 utility first appeared in SunOS 4.0, it appeared in its current form in
81 .Fx 1.1 .
82 .Pp
83 The
84 .Fl v
85 support is based on code written by
86 .An John Polstra Aq jdp@polstra.com