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
|
|
|
.\"
|
ldd.1, sprof.1, accept.2, alarm.2, bind.2, chdir.2, clock_nanosleep.2, close.2, connect.2, dup.2, execve.2, fsync.2, getgid.2, getpeername.2, getsid.2, getsockname.2, getsockopt.2, getuid.2, io_getevents.2, kill.2, listen.2, lseek.2, mmap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nice.2, pause.2, pipe.2, rmdir.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, select_tut.2, semctl.2, semop.2, setsid.2, shmctl.2, shmget.2, shmop.2, shutdown.2, sigaction.2, signal.2, socketpair.2, sync.2, timer_delete.2, timer_getoverrun.2, timer_settime.2, times.2, truncate.2, umask.2, MB_CUR_MAX.3, a64l.3, abs.3, assert.3, atexit.3, atof.3, atoi.3, basename.3, bsearch.3, btowc.3, byteorder.3, catgets.3, catopen.3, clock.3, clock_getcpuclockid.3, closedir.3, confstr.3, crypt.3, ctermid.3, difftime.3, div.3, dladdr.3, dlerror.3, dlinfo.3, dlopen.3, dlsym.3, drand48.3, encrypt.3, exit.3, fclose.3, ffs.3, fgetc.3, fgetwc.3, fgetws.3, flockfile.3, fmtmsg.3, fnmatch.3, fopen.3, fpathconf.3, fpclassify.3, fputwc.3, fputws.3, fseek.3, fseeko.3, ftok.3, fwide.3, getdate.3, getenv.3, getgrent.3, getgrnam.3, gethostid.3, getlogin.3, getnetent.3, getopt.3, getpwent.3, getpwnam.3, getsubopt.3, getutent.3, getwchar.3, grantpt.3, hsearch.3, iconv.3, iconv_close.3, iconv_open.3, if_nameindex.3, inet.3, inet_ntop.3, inet_pton.3, insque.3, isatty.3, isgreater.3, iswalnum.3, iswalpha.3, iswblank.3, iswcntrl.3, iswctype.3, iswdigit.3, iswgraph.3, iswlower.3, iswprint.3, iswpunct.3, iswspace.3, iswupper.3, iswxdigit.3, lockf.3, longjmp.3, lsearch.3, malloc.3, mblen.3, mbrlen.3, mbrtowc.3, mbsinit.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, memccpy.3, memchr.3, memcmp.3, memmove.3, memset.3, mktemp.3, mq_close.3, mq_getattr.3, mq_receive.3, mq_send.3, mq_unlink.3, offsetof.3, popen.3, posix_memalign.3, posix_openpt.3, printf.3, pthread_attr_setdetachstate.3, pthread_attr_setguardsize.3, pthread_attr_setinheritsched.3, pthread_attr_setschedparam.3, pthread_attr_setschedpolicy.3, pthread_attr_setscope.3, pthread_attr_setstack.3, pthread_attr_setstacksize.3, pthread_equal.3, pthread_exit.3, pthread_getcpuclockid.3, pthread_kill.3, pthread_self.3, pthread_setcancelstate.3, pthread_setconcurrency.3, pthread_setschedparam.3, pthread_setschedprio.3, pthread_sigmask.3, pthread_testcancel.3, ptsname.3, putenv.3, puts.3, putwchar.3, qsort.3, raise.3, random.3, readdir.3, regex.3, remove.3, rewinddir.3, seekdir.3, sem_destroy.3, sem_getvalue.3, sem_unlink.3, sem_wait.3, setenv.3, setjmp.3, setlocale.3, setlogmask.3, signbit.3, sigpause.3, sigset.3, sigsetops.3, sigwait.3, sleep.3, sockatmark.3, statvfs.3, strcat.3, strchr.3, strcmp.3, strcoll.3, strcpy.3, strlen.3, strpbrk.3, strptime.3, strspn.3, strstr.3, strtod.3, strtoimax.3, strtok.3, strtol.3, strtoul.3, strxfrm.3, swab.3, sysconf.3, system.3, tcgetpgrp.3, tcgetsid.3, telldir.3, tmpfile.3, towctrans.3, tsearch.3, ttyname.3, tzset.3, ungetwc.3, unlocked_stdio.3, unlockpt.3, wcrtomb.3, wcscat.3, wcschr.3, wcscmp.3, wcscpy.3, wcscspn.3, wcslen.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcspbrk.3, wcsrchr.3, wcsrtombs.3, wcsspn.3, wcsstr.3, wcstoimax.3, wcstok.3, wcstombs.3, wcswidth.3, wctob.3, wctomb.3, wctrans.3, wctype.3, wcwidth.3, wmemchr.3, wmemcmp.3, wmemcpy.3, wmemmove.3, wmemset.3, wordexp.3, wprintf.3, fanotify.7, mq_overview.7, nptl.7, sem_overview.7, shm_overview.7, sigevent.7, symlink.7, ld.so.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-08-08 16:21:22 +00:00
|
|
|
.TH LDD 1 2015-08-08 "" "Linux Programmer's Manual"
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH NAME
|
2015-07-10 18:37:59 +00:00
|
|
|
ldd \- print shared object dependencies
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH SYNOPSIS
|
2014-08-30 13:47:34 +00:00
|
|
|
.BR ldd " [\fIoption\fP]... \fIfile\fP..."
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.B ldd
|
2015-08-08 16:23:54 +00:00
|
|
|
prints the shared objects (shared libraries) required by each program or
|
2015-07-10 18:37:59 +00:00
|
|
|
shared object 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
|
2015-04-18 12:47:33 +00:00
|
|
|
.BR \-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
|
2015-04-18 12:47:33 +00:00
|
|
|
.BR \-u ", " \-\-unused
|
2006-07-12 10:41:40 +00:00
|
|
|
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
|
2015-04-18 12:47:33 +00:00
|
|
|
.BR \-d ", " \-\-data\-relocs
|
2004-11-03 13:51:07 +00:00
|
|
|
Perform relocations and report any missing objects (ELF only).
|
|
|
|
.TP
|
2015-04-18 12:47:33 +00:00
|
|
|
.BR \-r ", " \-\-function\-relocs
|
2004-11-03 13:51:07 +00:00
|
|
|
Perform relocations for both data objects and functions, and
|
|
|
|
report any missing objects or functions (ELF only).
|
|
|
|
.TP
|
|
|
|
.B \-\-help
|
|
|
|
Usage information.
|
2014-06-29 08:01:17 +00:00
|
|
|
.\" .SH NOTES
|
|
|
|
.\" The standard version of
|
|
|
|
.\" .B ldd
|
|
|
|
.\" comes with glibc2.
|
|
|
|
.\" Libc5 came with an older version, still present
|
|
|
|
.\" on some systems.
|
|
|
|
.\" The long options are not supported by the libc5 version.
|
|
|
|
.\" 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
|
|
|
|
.\" on the command line as-is when it contains a \(aq/\(aq; otherwise it
|
|
|
|
.\" searches for the library in the standard locations.
|
|
|
|
.\" To run it
|
|
|
|
.\" on a shared library in the current directory, prefix the name with "./".
|
2004-11-03 13:51:07 +00:00
|
|
|
.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
|
2014-06-09 10:19:42 +00:00
|
|
|
.BR pldd (1),
|
2015-03-08 02:19:54 +00:00
|
|
|
.BR sprof (1),
|
2004-11-03 13:51:07 +00:00
|
|
|
.BR ld.so (8),
|
|
|
|
.BR ldconfig (8)
|