]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man8/ld.so.8
pldd.1, bpf.2, chdir.2, clone.2, fanotify_init.2, fanotify_mark.2, intro.2, ipc.2...
[thirdparty/man-pages.git] / man8 / ld.so.8
index fab665d675dda365076c25ec1ee7555762637730..3747a1ab31ad31ca785f006a06e6f018b3ad13e7 100644 (file)
@@ -2,7 +2,7 @@
 .\" This is in the public domain
 .\" %%%LICENSE_END
 .\"
-.TH LD.SO 8 2017-09-15 "GNU" "Linux Programmer's Manual"
+.TH LD.SO 8 2019-08-02 "GNU" "Linux Programmer's Manual"
 .SH NAME
 ld.so, ld\-linux.so \- dynamic linker/loader
 .SH SYNOPSIS
@@ -33,17 +33,17 @@ during compilation.
 .PP
 The program
 .B ld.so
-handles a.out binaries, a format used long ago;
+handles a.out binaries, a binary format used long ago.
+The program
 .B ld\-linux.so*
 (\fI/lib/ld\-linux.so.1\fP for libc5, \fI/lib/ld\-linux.so.2\fP for glibc2)
-handles ELF,
-which everybody has been using for years now.
-Otherwise, both have the same behavior, and use the same
-support files and programs as
-.BR ldd (1),
+handles binaries that are in the more modern ELF format.
+Both programs have the same behavior, and use the same
+support files and programs
+.RB ( ldd (1),
 .BR ldconfig (8),
 and
-.IR /etc/ld.so.conf .
+.IR /etc/ld.so.conf ).
 .PP
 When resolving shared object dependencies,
 the dynamic linker first inspects each dependency
@@ -62,9 +62,9 @@ of the binary if present and DT_RUNPATH attribute does not exist.
 Use of DT_RPATH is deprecated.
 .IP o
 Using the environment variable
-.BR LD_LIBRARY_PATH
-(unless the executable is being run in secure-execution mode; see below).
-in which case it is ignored.
+.BR LD_LIBRARY_PATH ,
+unless the executable is being run in secure-execution mode (see below),
+in which case this variable is ignored.
 .IP o
 Using the directories specified in the
 DT_RUNPATH dynamic section attribute
@@ -154,12 +154,13 @@ value in the auxiliary vector (see
 .\" Don't do this!!
 .SH OPTIONS
 .TP
-.B \-\-list
-List all dependencies and how they are resolved.
-.TP
-.B \-\-verify
-Verify that program is dynamically linked and this dynamic linker can handle
-it.
+.BI \-\-audit " list"
+Use objects named in
+.I list
+as auditors.
+The objects in
+.I list
+are delimited by colons.
 .TP
 .B \-\-inhibit\-cache
 Do not use
@@ -184,20 +185,61 @@ environment variable.
 Ignore RPATH and RUNPATH information in object names in
 .IR list .
 This option is ignored when running in secure-execution mode (see below).
+The objects in
+.I list
+are delimited by colons or spaces.
 .TP
-.BI \-\-audit " list"
-Use objects named in
+.B \-\-list
+List all dependencies and how they are resolved.
+.TP
+.BR \-\-preload " \fIlist\fP (since glibc 2.30)"
+Preload the objects specified in
+.IR list .
+The objects in
 .I list
-as auditors.
+are delimited by colons or spaces.
+The objects are preloaded as explained in the description of the
+.BR LD_PRELOAD
+environment variable below.
+.IP
+By contrast with
+.BR LD_PRELOAD ,
+the
+.BR \-\-preload
+option provides a way to perform preloading for a single executable
+without affecting preloading performed in any child process that executes
+a new program.
+.TP
+.B \-\-verify
+Verify that program is dynamically linked and this dynamic linker can handle
+it.
 .SH ENVIRONMENT
 Various environment variables influence the operation of the dynamic linker.
 .\"
 .SS Secure-execution mode
 For security reasons,
-the effects of some environment variables are voided or modified if
-the dynamic linker determines that the binary should be
-run in secure-execution mode.
-(For details, see the discussion of individual environment variables below.)
+if the dynamic linker determines that a binary should be
+run in secure-execution mode,
+the effects of some environment variables are voided or modified,
+and furthermore those environment variables are stripped from the environment,
+so that the program does not even see the definitions.
+Some of these environment variables affect the operation of
+the dynamic linker itself, and are described below.
+Other environment variables treated in this way include:
+.BR GCONV_PATH ,
+.BR GETCONF_DIR ,
+.BR HOSTALIASES ,
+.BR LOCALDOMAIN ,
+.BR LOCPATH ,
+.BR MALLOC_TRACE ,
+.BR NIS_PATH ,
+.BR NLSPATH ,
+.BR RESOLV_HOST_CONF ,
+.BR RES_OPTIONS ,
+.BR TMPDIR ,
+and
+.BR TZDIR .
+.PP
 A binary is executed in secure-execution mode if the
 .B AT_SECURE
 entry in the auxiliary vector (see
@@ -271,10 +313,8 @@ This is useful when using a debugger.
 .B LD_LIBRARY_PATH
 A list of directories in which to search for
 ELF libraries at execution time.
-The items in the list are separated by either colons or semicolons.
-Similar to the
-.B PATH
-environment variable.
+The items in the list are separated by either colons or semicolons,
+and there is no support for escaping either separator.
 .IP
 This variable is ignored in secure-execution mode.
 .IP
@@ -310,9 +350,14 @@ as shell variables!)
 .B LD_PRELOAD
 A list of additional, user-specified, ELF shared
 objects to be loaded before all others.
-The items of the list can be separated by spaces or colons.
-This can be used to selectively override functions in other shared objects.
+This feature can be used to selectively override functions
+in other shared objects.
+.IP
+The items of the list can be separated by spaces or colons,
+and there is no support for escaping either separator.
 The objects are searched for using the rules given under DESCRIPTION.
+Objects are searched for and added to the link map in the left-to-right
+order specified in the list.
 .IP
 In secure-execution mode,
 preload pathnames containing slashes are ignored.
@@ -338,6 +383,23 @@ as described above in
 .\"
 .\" which will preload the libmod.so in 'lib' or 'lib64', using it
 .\" in preference to the version in '.'.
+.IP
+There are various methods of specifying libraries to be preloaded,
+and these are handled in the following order:
+.RS
+.IP (1) 4
+The
+.BR LD_PRELOAD
+environment variable.
+.IP (2)
+The
+.B \-\-preload
+command-line option when invoking the dynamic linker directly.
+.IP (3)
+The
+.I /etc/ld.so.preload
+file (described below).
+.RE
 .TP
 .BR LD_TRACE_LOADED_OBJECTS
 If set (to any value), causes the program to list its dynamic
@@ -349,11 +411,13 @@ Then there are lots of more or less obscure variables,
 many obsolete or only for internal use.
 .TP
 .BR LD_AUDIT " (since glibc 2.4)"
-A colon-separated list of user-specified, ELF shared objects
+A list of user-specified, ELF shared objects
 to be loaded before all others in a separate linker namespace
 (i.e., one that does not intrude upon the normal symbol bindings that
-would occur in the process).
+would occur in the process)
 These objects can be used to audit the operation of the dynamic linker.
+The items in the list are colon-separated,
+and there is no support for escaping the separator.
 .IP
 .B LD_AUDIT
 is ignored in secure-execution mode.
@@ -671,7 +735,7 @@ all programs that are executed on the system.
 and is typically employed only as an emergency remedy, for example,
 as a temporary workaround to a library misconfiguration issue.)
 .TP
-.B lib*.so*
+.I lib*.so*
 shared objects
 .PD
 .SH NOTES
@@ -686,6 +750,8 @@ machine and selects the most suitable version of a given shared object.
 Hardware capability directories can be cascaded to combine CPU features.
 The list of supported hardware capability names depends on the CPU.
 The following names are currently recognized:
+.\" Presumably, this info comes from sysdeps/i386/dl-procinfo.c and
+.\" similar files
 .TP
 .B Alpha
 ev4, ev5, ev56, ev6, ev67