chiark / gitweb /
eglibc (2.11.3-4+deb6u3) squeeze-lts; urgency=medium
[eglibc.git] / debian / local / manpages / ld.so.8
1 .TH "LD.SO" 8 "26 May 2007"
2 .SH NAME
3 ld.so/ld-linux.so \- dynamic linker/loader
4 .SH DESCRIPTION
5 .B ld.so
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
9 .B \-static
10 option to
11 .B ld
12 during compilation, all Linux programs are incomplete and require 
13 further linking at run time.
14 .PP
15 The necessary shared libraries needed by the program are searched for 
16 in the following order
17 .IP o
18 Using the environment variable
19 .B LD_LIBRARY_PATH
20 .RB ( LD_AOUT_LIBRARY_PATH
21 for a.out programs).
22 Except if the executable is a setuid/setgid binary, in which case it
23 is ignored.
24 .IP o
25 From the cache file
26 .BR /etc/ld.so.cache
27 which contains a compiled list of candidate libraries previously found
28 in the augmented library path.
29 .IP o
30 In the default path
31 .BR /lib ,
32 and then
33 .BR /usr/lib .
34 .SH COMMAND LINE OPTIONS
35 .TP
36 .B \-\-list
37 List all dependencies and how they are resolved.
38 .TP
39 .B \-\-verify
40 Verify that program is dynamically linked and this dynamic linker can handle
41 it.
42 .TP
43 .B \-\-library\-path PATH
44 Override
45 .B LD_LIBRARY_PATH
46 environment variable setting (see below).
47 .TP
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:
52 .TP
53 .B \-\-inhibit\-rpath LIST
54 .SH ENVIRONMENT
55 .TP
56 .B LD_LIBRARY_PATH
57 A colon-separated list of directories in which to search for
58 ELF libraries at execution-time.
59 Similar to the 
60 .B PATH
61 environment variable.
62 .TP
63 .B LD_PRELOAD
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.
69 .TP
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.
73 .TP
74 .B LD_BIND_NOW
75 If present, causes the dynamic linker to resolve all symbols at program
76 startup instead of when they are first referenced.
77 .TP
78 .B LD_BIND_NOT 
79 Do not update the GOT (global offset table) and PLT (procedure linkage table) after resolving a symbol.
80 .TP
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.
84 Similar to the 
85 .B PATH
86 environment variable.
87 .TP
88 .B LD_AOUT_PRELOAD
89 The name of an additional, user-specified, a.out shared library to be loaded 
90 after all others.
91 This can be used to selectively override functions in other shared libraries.
92 .TP
93 .B LD_NOWARN
94 Suppress warnings about a.out libraries with incompatible minor 
95 version numbers.
96 .TP
97 .B LD_WARN
98 If set to non-empty string, warn about unresolved symbols.
99 .TP
100 .B LD_KEEPDIR
101 Don't ignore the directory in the names of a.out libraries to be loaded.
102 Use of this option is strongly discouraged.
103 .TP
104 .B LD_DEBUG
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.
109 .TP
110 .B LD_DEBUG_OUTPUT
111 File where LD_DEBUG output should be fed into, default is standard
112 output. LD_DEBUG_OUTPUT is ignored for setuid/setgid binaries.
113 .TP
114 .B LD_VERBOSE
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).
119 .TP
120 .B LD_PROFILE 
121 Shared object to be profiled. 
122 .TP
123 .B
124 LD_PROFILE_OUTPUT 
125 File where 
126 .B LD_PROFILE
127 output should be stored, default is standard output. LD_PROFILE_OUTPUT is ignored for setuid/setgid binaries.
128 .TP
129 .B LD_ASSUME_KERNEL
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.
134 The
135 .B LD_ASSUME_KERNEL
136 environment variable overrides the kernel version used by the dynamic linker to determine which
137 library to load.
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).
141 .TP
142 .B $ORIGIN
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 
148 hierarchy.
149 .TP
150 .B $PLATFORM
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.
155 .TP
156 .B $LIB
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.
160 .SH FILES
161 .PD 0
162 .TP 20
163 .B /lib/ld.so
164 a.out dynamic linker/loader
165 .TP 20
166 .B /lib/ld-linux.so.*
167 ELF dynamic linker/loader
168 .TP
169 .B /etc/ld.so.cache
170 File containing a compiled list of directories in which to search for
171 libraries and an ordered list of candidate libraries.
172 .TP
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.
177 .TP
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.
181 .TP
182 .B lib*.so*
183 shared libraries
184 .PD
185 .SH SEE ALSO
186 .BR ldd (1),
187 .BR ldconfig (8).
188 .SH BUGS
189 .LP
190 Currently
191 .B ld.so
192 has no means of unloading and searching for compatible or newer version of
193 libraries.
194 .PP
195 .B ld.so
196 functionality is only available for executables compiled using libc version
197 4.4.3 or greater.
198 .SH AUTHORS
199 David Engel, Eric Youngdale, Peter MacDonald, Hongjiu Lu, Linus
200 Torvalds, Lars Wirzenius and Mitch D'Souza (not necessarily in that order).