X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=original%2Fman1%2Fldd.1;h=406089f4b5458ca23e503b36cb44a7a8cfd03d84;hb=110dba020f489b75aff2497105f7970c05e2b87c;hp=5646b9c3e50768ec88658e16f2f2fa5c083150e1;hpb=633a2252e0be3c867dce264a180a89ce8181d36f;p=linuxjm%2FLDP_man-pages.git diff --git a/original/man1/ldd.1 b/original/man1/ldd.1 index 5646b9c3..406089f4 100644 --- a/original/man1/ldd.1 +++ b/original/man1/ldd.1 @@ -5,9 +5,13 @@ .\" Copyright 2000 Jakub Jelinek (jakub@redhat.com) .\" Corrected. .\" Most of this was copied from the README file. +.\" +.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE) .\" Do not restrict distribution. .\" May be distributed under the GNU General Public License -.TH LDD 1 2000-10-30 "" "Linux Programmer's Manual" +.\" %%%LICENSE_END +.\" +.TH LDD 1 2012-07-16 "" "Linux Programmer's Manual" .SH NAME ldd \- print shared library dependencies .SH SYNOPSIS @@ -16,6 +20,34 @@ ldd \- print shared library dependencies .B ldd prints the shared libraries required by each program or shared library specified on the command line. +.SS Security +In the usual case, +.B ldd +invokes the standard dynamic linker (see +.BR ld.so (8)) +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: + + $ objdump \-p /path/to/program | grep NEEDED .SH OPTIONS .TP .B \-\-version @@ -68,10 +100,20 @@ support was added to the compiler releases. If you use .B ldd on one of these programs, the program will attempt to run with -\fIargc\fP = 0 and the results will be unpredictable. +.I argc += 0 and the results will be unpredictable. .\" .SH AUTHOR .\" David Engel. .\" Roland McGrath and Ulrich Drepper. .SH SEE ALSO .BR ld.so (8), .BR ldconfig (8) +.SH COLOPHON +This page is part of release 3.68 of the Linux +.I man-pages +project. +A description of the project, +information about reporting bugs, +and the latest version of this page, +can be found at +\%http://www.kernel.org/doc/man\-pages/.