2004-11-03 13:51:07 +00:00
|
|
|
.\" Copyright 1995-2000 David Engel (david@ods.com)
|
|
|
|
.\" Copyright 1995 Rickard E. Faith (faith@cs.unc.edu)
|
|
|
|
.\" Copyright 2000 Ben Collins (bcollins@debian.org)
|
|
|
|
.\" Redone for GLibc 2.2
|
|
|
|
.\" Copyright 2000 Jakub Jelinek (jakub@redhat.com)
|
|
|
|
.\" Corrected.
|
|
|
|
.\" Most of this was copied from the README file.
|
ldd.1, capget.2, clone.2, create_module.2, fallocate.2, futex.2, get_kernel_syms.2, get_thread_area.2, getcpu.2, getitimer.2, getpid.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_list.2, mkdir.2, mknod.2, pciconfig_read.2, pivot_root.2, posix_fadvise.2, query_module.2, sendfile.2, set_thread_area.2, setns.2, unshare.2, __setfpucw.3, a64l.3, addseverity.3, argz_add.3, bindresvport.3, cabs.3, cacos.3, cacosh.3, canonicalize_file_name.3, carg.3, casin.3, casinh.3, catan.3, catanh.3, ccos.3, ccosh.3, cerf.3, cexp.3, cexp2.3, cimag.3, clog.3, clog10.3, clog2.3, cmsg.3, conj.3, cpow.3, cproj.3, creal.3, csin.3, csinh.3, csqrt.3, ctan.3, ctanh.3, des_crypt.3, envz_add.3, fdim.3, fma.3, fmax.3, fmemopen.3, fmin.3, fmtmsg.3, fpclassify.3, gamma.3, getpt.3, getrpcent.3, getrpcport.3, getttyent.3, isgreater.3, key_setsecret.3, lgamma.3, malloc_hook.3, mempcpy.3, nan.3, netlink.3, nextafter.3, putgrent.3, remove.3, remquo.3, rpc.3, rtime.3, rtnetlink.3, setaliasent.3, setnetgrent.3, signbit.3, significand.3, sincos.3, stdin.3, tgamma.3, xcrypt.3, xdr.3, cciss.4, hpsa.4, mouse.4, pts.4, sk98lin.4, tty_ioctl.4, wavelan.4, hosts.equiv.5, rpc.5, tzfile.5, boot.7, complex.7, ddp.7, fifo.7, futex.7, icmp.7, ip.7, ipv6.7, netdevice.7, netlink.7, packet.7, raw.7, rtnetlink.7, socket.7, tcp.7, udp.7, unix.7, x25.7, sync.8: Global fix: Put copyright info at top of page, followed by blank line and LICENSE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-10 09:29:51 +00:00
|
|
|
.\"
|
ldd.1, clone.2, create_module.2, get_kernel_syms.2, get_thread_area.2, io_cancel.2, io_setup.2, io_submit.2, mkdir.2, mknod.2, query_module.2, set_thread_area.2, __setfpucw.3, hosts.equiv.5, sync.8: Added LICENSE_START(GPL_NOVERSION_ONELINE)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-10 09:28:51 +00:00
|
|
|
.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
|
2013-03-10 10:01:30 +00:00
|
|
|
.\" Do not restrict distribution.
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" May be distributed under the GNU General Public License
|
ldd.1, clone.2, create_module.2, get_kernel_syms.2, get_thread_area.2, io_cancel.2, io_setup.2, io_submit.2, mkdir.2, mknod.2, query_module.2, set_thread_area.2, __setfpucw.3, hosts.equiv.5, sync.8: Added LICENSE_START(GPL_NOVERSION_ONELINE)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-10 09:28:51 +00:00
|
|
|
.\" %%%LICENSE_END
|
ldd.1, arch_prctl.2, faccessat.2, fchmodat.2, fchownat.2, flock.2, futimesat.2, getcpu.2, getdents.2, getitimer.2, getpid.2, getresuid.2, getunwind.2, kexec_load.2, mkdirat.2, mknodat.2, openat.2, outb.2, perfmonctl.2, readlinkat.2, renameat.2, symlinkat.2, timer_delete.2, timer_getoverrun.2, timer_settime.2, unlinkat.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-12 11:35:04 +00:00
|
|
|
.\"
|
2012-07-16 16:29:44 +00:00
|
|
|
.TH LDD 1 2012-07-16 "" "Linux Programmer's Manual"
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH NAME
|
|
|
|
ldd \- print shared library dependencies
|
|
|
|
.SH SYNOPSIS
|
2007-12-07 19:44:42 +00:00
|
|
|
.BR ldd " [OPTION]... FILE..."
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.B ldd
|
|
|
|
prints the shared libraries required by each program or shared library
|
|
|
|
specified on the command line.
|
2012-07-16 16:29:44 +00:00
|
|
|
.SS Security
|
|
|
|
In the usual case,
|
|
|
|
.B ldd
|
|
|
|
invokes the standard dynamic linker (see
|
2012-09-23 14:30:10 +00:00
|
|
|
.BR ld.so (8))
|
2012-07-16 16:29:44 +00:00
|
|
|
with the
|
|
|
|
.B LD_TRACE_LOADED_OBJECTS
|
|
|
|
environment variable set to 1,
|
|
|
|
which causes the linker to display the library dependencies.
|
|
|
|
Be aware,
|
|
|
|
however,
|
|
|
|
that in some circumstances, some versions of
|
|
|
|
.BR ldd
|
|
|
|
may attempt to obtain the dependency information
|
|
|
|
by directly executing the program.
|
|
|
|
.\" Mainline glibc's ldd allows this possibility (the line
|
|
|
|
.\" try_trace "$file"
|
|
|
|
.\" in glibc 2.15, for example), but many distro versions of
|
|
|
|
.\" ldd seem to remove that code path from the script.
|
|
|
|
Thus, you should
|
|
|
|
.I never
|
|
|
|
employ
|
|
|
|
.B ldd
|
|
|
|
on an untrusted executable,
|
|
|
|
since this may result in the execution of arbitrary code.
|
|
|
|
A safer alternative when dealing with untrusted executables is:
|
|
|
|
|
ldd.1, execve.2, getdents.2, quotactl.2, select_tut.2, clock_getcpuclockid.3, fopencookie.3, getservent_r.3, matherr.3, mq_notify.3, pthread_create.3, pthread_getattr_np.3, wordexp.3: Global fix: s/-/\\-/ when real hyphen is required (e.g., in code)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-08-29 10:04:28 +00:00
|
|
|
$ objdump \-p /path/to/program | grep NEEDED
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH OPTIONS
|
|
|
|
.TP
|
2005-10-04 12:49:58 +00:00
|
|
|
.B \-\-version
|
2004-11-03 13:51:07 +00:00
|
|
|
Print the version number of
|
|
|
|
.BR ldd .
|
|
|
|
.TP
|
|
|
|
.B \-v\ \-\-verbose
|
2007-06-08 11:56:22 +00:00
|
|
|
Print all information, including, for example,
|
|
|
|
symbol versioning information.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
2006-07-12 10:41:40 +00:00
|
|
|
.B \-u\ \-\-unused
|
|
|
|
Print unused direct dependencies.
|
2006-09-18 11:46:25 +00:00
|
|
|
(Since glibc 2.3.4.)
|
2006-07-12 10:41:40 +00:00
|
|
|
.TP
|
2004-11-03 13:51:07 +00:00
|
|
|
.B \-d\ \-\-data\-relocs
|
|
|
|
Perform relocations and report any missing objects (ELF only).
|
|
|
|
.TP
|
|
|
|
.B \-r\ \-\-function\-relocs
|
|
|
|
Perform relocations for both data objects and functions, and
|
|
|
|
report any missing objects or functions (ELF only).
|
|
|
|
.TP
|
|
|
|
.B \-\-help
|
|
|
|
Usage information.
|
|
|
|
.SH NOTES
|
|
|
|
The standard version of
|
|
|
|
.B ldd
|
2007-06-08 03:17:37 +00:00
|
|
|
comes with glibc2.
|
|
|
|
Libc5 came with an older version, still present
|
2007-06-08 11:25:04 +00:00
|
|
|
on some systems.
|
|
|
|
The long options are not supported by the libc5 version.
|
2004-11-03 13:51:07 +00:00
|
|
|
On the other hand, the glibc2 version does not support
|
|
|
|
.B \-V
|
|
|
|
and only has the equivalent
|
|
|
|
.BR \-\-version .
|
|
|
|
.LP
|
|
|
|
The libc5 version of this program will use the name of a library given
|
2008-06-09 15:49:35 +00:00
|
|
|
on the command line as-is when it contains a \(aq/\(aq; otherwise it
|
2007-06-08 11:25:04 +00:00
|
|
|
searches for the library in the standard locations.
|
|
|
|
To run it
|
2004-11-03 13:51:07 +00:00
|
|
|
on a shared library in the current directory, prefix the name with "./".
|
|
|
|
.SH BUGS
|
|
|
|
.B ldd
|
|
|
|
does not work on a.out shared libraries.
|
|
|
|
.PP
|
|
|
|
.B ldd
|
|
|
|
does not work with some extremely old a.out programs which were
|
|
|
|
built before
|
|
|
|
.B ldd
|
|
|
|
support was added to the compiler releases.
|
|
|
|
If you use
|
|
|
|
.B ldd
|
|
|
|
on one of these programs, the program will attempt to run with
|
2013-06-08 04:48:01 +00:00
|
|
|
.I argc
|
|
|
|
= 0 and the results will be unpredictable.
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" .SH AUTHOR
|
|
|
|
.\" David Engel.
|
|
|
|
.\" Roland McGrath and Ulrich Drepper.
|
|
|
|
.SH SEE ALSO
|
|
|
|
.BR ld.so (8),
|
|
|
|
.BR ldconfig (8)
|