1 .TH "LD.SO" 8 "26 May 2007"
3 ld.so/ld-linux.so \- dynamic linker/loader
6 loads the shared libraries needed by a program, prepares the program
7 to run, and then runs it.
8 Unless explicitly specified via the
12 during compilation, all Linux programs are incomplete and require
13 further linking at run time.
15 The necessary shared libraries needed by the program are searched for
16 in the following order
18 Using the environment variable
20 .RB ( LD_AOUT_LIBRARY_PATH
22 Except if the executable is a setuid/setgid binary, in which case it
27 which contains a compiled list of candidate libraries previously found
28 in the augmented library path.
34 .SH COMMAND LINE OPTIONS
37 List all dependencies and how they are resolved.
40 Verify that program is dynamically linked and this dynamic linker can handle
43 .B \-\-library\-path PATH
46 environment variable setting (see below).
48 .B \-\-ignore\-rpath LIST
49 Ignore RPATH and RUNPATH information in object names in LIST.
50 This option has been supported by glibc2 for about one hour.
51 Then it was renamed into:
53 .B \-\-inhibit\-rpath LIST
57 A colon-separated list of directories in which to search for
58 ELF libraries at execution-time.
64 A whitespace-separated list of additional, user-specified, ELF shared
65 libraries to be loaded before all others.
66 This can be used to selectively override functions in other shared libraries.
67 For setuid/setgid ELF binaries, only libraries in the standard search
68 directories that are also setgid will be loaded.
70 .B LD_TRACE_LOADED_OBJECTS
71 If present, causes the program to list its dynamic library dependencies,
72 as if run by ldd, instead of running normally.
75 If present, causes the dynamic linker to resolve all symbols at program
76 startup instead of when they are first referenced.
79 Do not update the GOT (global offset table) and PLT (procedure linkage table) after resolving a symbol.
81 .B LD_AOUT_LIBRARY_PATH
82 A colon-separated list of directories in which to search for
83 a.out libraries at execution-time.
89 The name of an additional, user-specified, a.out shared library to be loaded
91 This can be used to selectively override functions in other shared libraries.
94 Suppress warnings about a.out libraries with incompatible minor
98 If set to non-empty string, warn about unresolved symbols.
101 Don't ignore the directory in the names of a.out libraries to be loaded.
102 Use of this option is strongly discouraged.
105 Output verbose debugging information about the dynamic linker.
106 If set to `all' prints all debugging information it has, if set to
107 `help' prints a help message about which categories can be specified
108 in this environment variable.
111 File where LD_DEBUG output should be fed into, default is standard
112 output. LD_DEBUG_OUTPUT is ignored for setuid/setgid binaries.
115 If set to non-empty string, output symbol versioning information
116 about the program if querying information about the program (ie. either
117 .B LD_TRACE_LOADED_OBJECTS
118 has been set, or --list or --verify options have been given to the dynamic linker).
121 Shared object to be profiled.
127 output should be stored, default is standard output. LD_PROFILE_OUTPUT is ignored for setuid/setgid binaries.
130 Every DSO (Dynamic Shared Object, aka shared library) can tell the dynamic linker in glibc which
131 minimum OS ABI version is needed. The information about the minimum OS ABI version is encoded in
132 a ELF note section usually named .note.ABI-tag. This is used to determine which library to load
133 when multiple version of the same library is installed on the system.
136 environment variable overrides the kernel version used by the dynamic linker to determine which
138 .SH RPATH TOKEN EXPANSION
139 The runtime linker provides a number of tokens that can be used in an rpath
140 specification (\fBDT_RPATH\fR or \fBDT_RUNPATH\fR).
143 ld.so understands the string \fB$ORIGIN\fR (or equivalently \fB${ORIGIN}\fR)
144 in an rpath specification to mean the directory containing the application
145 executable. Thus, an application located in somedir/app could be compiled
146 with gcc -Wl,-rpath,'$ORIGIN/../lib' so that it finds an associated shared
147 library in somedir/lib no matter where somedir is located in the directory
151 The string \fB$PLATFORM\fR (or equivalently \fB${PLATFORM}\fR) in an rpath
152 specifcation expands to the processor type of the current machine. Please note
153 that on some architectures the Linux kernel doesn't provide a platform
154 string to the dynamic linker.
157 The string \fB$LIB\fR (or equivalently \fB${LIB}\fR) in an rpath corresponds
158 to the system libraries directory, which is /lib for the native architecture
159 on FHS compliant GNU/Linux systems.
164 a.out dynamic linker/loader
166 .B /lib/ld-linux.so.*
167 ELF dynamic linker/loader
170 File containing a compiled list of directories in which to search for
171 libraries and an ordered list of candidate libraries.
173 .B /etc/ld.so.preload
174 File containing a whitespace separated list of ELF shared libraries to
175 be loaded before the program.
176 libraries and an ordered list of candidate libraries.
178 .B /etc/ld.so.nohwcap
179 When this file is present the dynamic linker will load the non-optimized version
180 of a library, even if the CPU supports the optimized version.
192 has no means of unloading and searching for compatible or newer version of
196 functionality is only available for executables compiled using libc version
199 David Engel, Eric Youngdale, Peter MacDonald, Hongjiu Lu, Linus
200 Torvalds, Lars Wirzenius and Mitch D'Souza (not necessarily in that order).