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)
7 .\" Most of this was copied from the README file.
9 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
10 .\" Do not restrict distribution.
11 .\" May be distributed under the GNU General Public License
14 .TH LDD 1 2014-07-08 "" "Linux Programmer's Manual"
16 ldd \- print shared library dependencies
18 .BR ldd " [\fIoption\fP]... \fIfile\fP..."
21 prints the shared libraries required by each program or shared library
22 specified on the command line.
26 invokes the standard dynamic linker (see
29 .B LD_TRACE_LOADED_OBJECTS
30 environment variable set to 1,
31 which causes the linker to display the library dependencies.
34 that in some circumstances, some versions of
36 may attempt to obtain the dependency information
37 by directly executing the program.
38 .\" Mainline glibc's ldd allows this possibility (the line
40 .\" in glibc 2.15, for example), but many distro versions of
41 .\" ldd seem to remove that code path from the script.
46 on an untrusted executable,
47 since this may result in the execution of arbitrary code.
48 A safer alternative when dealing with untrusted executables is:
50 $ objdump \-p /path/to/program | grep NEEDED
54 Print the version number of
58 Print all information, including, for example,
59 symbol versioning information.
62 Print unused direct dependencies.
65 .B \-d\ \-\-data\-relocs
66 Perform relocations and report any missing objects (ELF only).
68 .B \-r\ \-\-function\-relocs
69 Perform relocations for both data objects and functions, and
70 report any missing objects or functions (ELF only).
75 .\" The standard version of
77 .\" comes with glibc2.
78 .\" Libc5 came with an older version, still present
80 .\" The long options are not supported by the libc5 version.
81 .\" On the other hand, the glibc2 version does not support
83 .\" and only has the equivalent
86 .\" The libc5 version of this program will use the name of a library given
87 .\" on the command line as-is when it contains a \(aq/\(aq; otherwise it
88 .\" searches for the library in the standard locations.
90 .\" on a shared library in the current directory, prefix the name with "./".
93 does not work on a.out shared libraries.
96 does not work with some extremely old a.out programs which were
99 support was added to the compiler releases.
102 on one of these programs, the program will attempt to run with
104 = 0 and the results will be unpredictable.
107 .\" Roland McGrath and Ulrich Drepper.