]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man1/ldd.1
inotify.7: tfix
[thirdparty/man-pages.git] / man1 / ldd.1
CommitLineData
fea681da
MK
1.\" Copyright 1995-2000 David Engel (david@ods.com)
2.\" Copyright 1995 Rickard E. Faith (faith@cs.unc.edu)
3.\" Copyright 2000 Ben Collins (bcollins@debian.org)
4.\" Redone for GLibc 2.2
5.\" Copyright 2000 Jakub Jelinek (jakub@redhat.com)
6.\" Corrected.
7.\" Most of this was copied from the README file.
8.\" Do not restrict distribution.
9.\" May be distributed under the GNU General Public License
ca93a9ed 10.TH LDD 1 2012-07-16 "" "Linux Programmer's Manual"
fea681da
MK
11.SH NAME
12ldd \- print shared library dependencies
13.SH SYNOPSIS
d6d1a7c0 14.BR ldd " [OPTION]... FILE..."
fea681da
MK
15.SH DESCRIPTION
16.B ldd
17prints the shared libraries required by each program or shared library
18specified on the command line.
ca93a9ed
MK
19.SS Security
20In the usual case,
21.B ldd
22invokes the standard dynamic linker (see
23.BR ld.so(8))
24with the
25.B LD_TRACE_LOADED_OBJECTS
26environment variable set to 1,
27which causes the linker to display the library dependencies.
28Be aware,
29however,
30that in some circumstances, some versions of
31.BR ldd
32may attempt to obtain the dependency information
33by directly executing the program.
34.\" Mainline glibc's ldd allows this possibility (the line
35.\" try_trace "$file"
36.\" in glibc 2.15, for example), but many distro versions of
37.\" ldd seem to remove that code path from the script.
38Thus, you should
39.I never
40employ
41.B ldd
42on an untrusted executable,
43since this may result in the execution of arbitrary code.
44A safer alternative when dealing with untrusted executables is:
45
72da9ef1 46 $ objdump \-p /path/to/program | grep NEEDED
fea681da
MK
47.SH OPTIONS
48.TP
9de38bff 49.B \-\-version
fea681da
MK
50Print the version number of
51.BR ldd .
52.TP
53.B \-v\ \-\-verbose
75b94dc3
MK
54Print all information, including, for example,
55symbol versioning information.
fea681da 56.TP
46672d0d
MK
57.B \-u\ \-\-unused
58Print unused direct dependencies.
cd38a583 59(Since glibc 2.3.4.)
46672d0d 60.TP
fea681da
MK
61.B \-d\ \-\-data\-relocs
62Perform relocations and report any missing objects (ELF only).
63.TP
64.B \-r\ \-\-function\-relocs
65Perform relocations for both data objects and functions, and
66report any missing objects or functions (ELF only).
67.TP
68.B \-\-help
69Usage information.
70.SH NOTES
71The standard version of
72.B ldd
677f4766
MK
73comes with glibc2.
74Libc5 came with an older version, still present
ca7b3c18
MK
75on some systems.
76The long options are not supported by the libc5 version.
fea681da
MK
77On the other hand, the glibc2 version does not support
78.B \-V
79and only has the equivalent
80.BR \-\-version .
81.LP
82The libc5 version of this program will use the name of a library given
f81fb444 83on the command line as-is when it contains a \(aq/\(aq; otherwise it
ca7b3c18
MK
84searches for the library in the standard locations.
85To run it
fea681da
MK
86on a shared library in the current directory, prefix the name with "./".
87.SH BUGS
88.B ldd
89does not work on a.out shared libraries.
90.PP
91.B ldd
92does not work with some extremely old a.out programs which were
93built before
94.B ldd
95support was added to the compiler releases.
96If you use
97.B ldd
98on one of these programs, the program will attempt to run with
99\fIargc\fP = 0 and the results will be unpredictable.
100.\" .SH AUTHOR
101.\" David Engel.
102.\" Roland McGrath and Ulrich Drepper.
103.SH SEE ALSO
104.BR ld.so (8),
105.BR ldconfig (8)