]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man8/ld.so.8
ld.so.8: Since glibc 2.2.5, LD_PROFILE is ignored in secure-execution mode
[thirdparty/man-pages.git] / man8 / ld.so.8
CommitLineData
2d6c6dd1 1.\" %%%LICENSE_START(PUBLIC_DOMAIN)
fea681da 2.\" This is in the public domain
2d6c6dd1 3.\" %%%LICENSE_END
6a717e5e 4.\"
734882f4 5.TH LD.SO 8 2017-05-03 "GNU" "Linux Programmer's Manual"
fea681da 6.SH NAME
01078c2d 7ld.so, ld-linux.so \- dynamic linker/loader
a1d5f77c 8.SH SYNOPSIS
cd6dddf6 9The dynamic linker can be run either indirectly by running some
43151de3
MK
10dynamically linked program or shared object
11(in which case no command-line options
a1d5f77c
MK
12to the dynamic linker can be passed and, in the ELF case, the dynamic linker
13which is stored in the
14.B .interp
15section of the program is executed) or directly by running:
16.P
17.I /lib/ld-linux.so.*
18[OPTIONS] [PROGRAM [ARGUMENTS]]
fea681da
MK
19.SH DESCRIPTION
20The programs
21.B ld.so
22and
23.B ld-linux.so*
43151de3
MK
24find and load the shared objects (shared libraries) needed by a program,
25prepare the program to run, and then run it.
fea681da
MK
26.LP
27Linux binaries require dynamic linking (linking at run time)
28unless the
29.B \-static
30option was given to
f19a0f03 31.BR ld (1)
fea681da
MK
32during compilation.
33.LP
34The program
35.B ld.so
36handles a.out binaries, a format used long ago;
37.B ld-linux.so*
d8d00ab7
MK
38(\fI/lib/ld-linux.so.1\fP for libc5, \fI/lib/ld-linux.so.2\fP for glibc2)
39handles ELF,
40which everybody has been using for years now.
2b9b829d 41Otherwise, both have the same behavior, and use the same
fea681da
MK
42support files and programs
43.BR ldd (1),
9af134cd 44.BR ldconfig (8),
fea681da
MK
45and
46.IR /etc/ld.so.conf .
47.LP
43151de3 48When resolving shared object dependencies,
15d116d5
MK
49the dynamic linker first inspects each dependency
50string to see if it contains a slash (this can occur if
43151de3 51a shared object pathname containing slashes was specified at link time).
15d116d5
MK
52If a slash is found, then the dependency string is interpreted as
53a (relative or absolute) pathname,
43151de3 54and the shared object is loaded using that pathname.
15d116d5 55.LP
43151de3 56If a shared object dependency does not contain a slash,
15d116d5 57then it is searched for in the following order:
cd6dddf6 58.IP o 3
dc4b358f 59Using the directories specified in the
cd6dddf6 60DT_RPATH dynamic section attribute
fea681da
MK
61of the binary if present and DT_RUNPATH attribute does not exist.
62Use of DT_RPATH is deprecated.
63.IP o
64Using the environment variable
24fb0923
MK
65.BR LD_LIBRARY_PATH
66(unless the executable is being run in secure-execution mode; see below).
880f5b4b 67in which case it is ignored.
fea681da 68.IP o
dc4b358f 69Using the directories specified in the
cd6dddf6 70DT_RUNPATH dynamic section attribute
fea681da
MK
71of the binary if present.
72.IP o
73From the cache file
de6d7600 74.IR /etc/ld.so.cache ,
43151de3 75which contains a compiled list of candidate shared objects previously found
c13182ef 76in the augmented library path.
cd6dddf6 77If, however, the binary was linked with the
4d9b6984 78.B \-z nodeflib
43151de3
MK
79linker option, shared objects in the default paths are skipped.
80Shared objects installed in hardware capability directories (see below)
81are preferred to other shared objects.
fea681da
MK
82.IP o
83In the default path
8478ee02 84.IR /lib ,
fea681da 85and then
8478ee02 86.IR /usr/lib .
39a15561 87(On some 64-bit architectures, the default paths for 64-bit shared objects are
b9359c7a
MK
88.IR /lib64 ,
89and then
90.IR /usr/lib64 .)
cd6dddf6 91If the binary was linked with the
4d9b6984 92.B \-z nodeflib
fea681da 93linker option, this step is skipped.
eeb25d47 94.SS Rpath token expansion
0a216931
MK
95.PP
96.B ld.so
99194a09
MK
97understands certain token strings in an rpath specification
98(DT_RPATH or DT_RUNPATH).
99Those strings are substituted as follows:
eeb25d47
MK
100.TP
101.IR $ORIGIN " (or equivalently " ${ORIGIN} )
8a94e783 102This expands to
43151de3 103the directory containing the program or shared object.
0a216931
MK
104Thus, an application located in
105.I somedir/app
106could be compiled with
eeb25d47 107
5c977011 108 gcc \-Wl,\-rpath,\(aq$ORIGIN/../lib\(aq
eeb25d47 109
43151de3 110so that it finds an associated shared object in
0a216931 111.I somedir/lib
988db661
MK
112no matter where
113.I somedir
0a216931
MK
114is located in the directory hierarchy.
115This facilitates the creation of "turn-key" applications that
116do not need to be installed into special directories,
117but can instead be unpacked into any directory
43151de3 118and still find their own shared objects.
909df276
MK
119.TP
120.IR $LIB " (or equivalently " ${LIB} )
121This expands to
122.I lib
123or
124.I lib64
125depending on the architecture
126(e.g., on x86-64, it expands to
127.IR lib64
128and
129on x86-32, it expands to
130.IR lib ).
3f2f2461
MK
131.TP
132.IR $PLATFORM " (or equivalently " ${PLATFORM} )
133This expands to a string corresponding to the processor type
134of the host system (e.g., "x86_64").
135On some architectures, the Linux kernel doesn't provide a platform
136string to the dynamic linker.
137The value of this string is taken from the
138.BR AT_PLATFORM
139value in the auxiliary vector (see
140.BR getauxval (3)).
141.\" To get an idea of the places that $PLATFORM would match,
142.\" look at the output of the following:
0a216931 143.\"
3f2f2461
MK
144.\" mkdir /tmp/d
145.\" LD_LIBRARY_PATH=/tmp/d strace -e open /bin/date 2>&1 | grep /tmp/d
0a216931
MK
146.\"
147.\" ld.so lets names be abbreviated, so $O will work for $ORIGIN;
148.\" Don't do this!!
9d4869b3 149.SH OPTIONS
fea681da 150.TP
4d9b6984 151.B \-\-list
fea681da
MK
152List all dependencies and how they are resolved.
153.TP
4d9b6984 154.B \-\-verify
fea681da
MK
155Verify that program is dynamically linked and this dynamic linker can handle
156it.
157.TP
495dadb7 158.B \-\-inhibit-cache
8584e381
MK
159Do not use
160.IR /etc/ld.so.cache .
495dadb7 161.TP
a831ad17
MK
162.BI \-\-library\-path " path"
163Use
164.I path
165instead of
fea681da
MK
166.B LD_LIBRARY_PATH
167environment variable setting (see below).
0a8909c4
MK
168The names
169.IR ORIGIN ,
170.IR LIB ,
171and
172.IR PLATFORM
173are interpreted as for the
174.BR LD_LIBRARY_PATH
175environment variable.
fea681da 176.TP
a831ad17
MK
177.BI \-\-inhibit\-rpath " list"
178Ignore RPATH and RUNPATH information in object names in
179.IR list .
6e1064d3 180This option is ignored when running in secure-execution mode (see below).
608dce1f 181.TP
a831ad17
MK
182.BI \-\-audit " list"
183Use objects named in
184.I list
185as auditors.
fea681da 186.SH ENVIRONMENT
6e1064d3 187Various environment variables influence the operation of the dynamic linker.
9894eac3
MK
188.\"
189.SS Secure-execution mode
190For security reasons,
191the effects of some environment variables are voided or modified if
192the dynamic linker determines that the binary should be
193run in secure-execution mode.
59e6b4c6
MK
194(For details, see the discussion of individual environment variables below.)
195A binary is executed in secure-execution mode if the
9894eac3
MK
196.B AT_SECURE
197entry in the auxiliary vector (see
198.BR getauxval (3))
199has a nonzero value.
200This entry may have a nonzero value for various reasons, including:
201.IP * 3
202The process's real and effective user IDs differ,
203or the real and effective group IDs differ.
c93f2202 204This typically occurs as a result of executing
9894eac3
MK
205a set-user-ID or set-group-ID program.
206.IP *
207A process with a non-root user ID executed a binary that
208conferred permitted or effective capabilities.
209.IP *
210A nonzero value may have been set by a Linux Security Module.
211.\"
212.SS Environment variables
6f6a4840 213Among the more important environment variables are the following:
fea681da 214.TP
9a741b5b 215.BR LD_ASSUME_KERNEL " (since glibc 2.2.3)"
43151de3 216Each shared object can inform the dynamic linker of the minimum kernel ABI
eeb25d47 217version that it requires.
ef74d4ad
MK
218(This requirement is encoded in an ELF note section that is viewable via
219.IR "readelf\ \-n"
220as a section labeled
221.BR NT_GNU_ABI_TAG .)
eeb25d47
MK
222At run time,
223the dynamic linker determines the ABI version of the running kernel and
43151de3 224will reject loading shared objects that specify minimum ABI versions
eeb25d47
MK
225that exceed that ABI version.
226
227.BR LD_ASSUME_KERNEL
228can be used to
229cause the dynamic linker to assume that it is running on a system with
230a different kernel ABI version.
231For example, the following command line causes the
232dynamic linker to assume it is running on Linux 2.2.5 when loading
43151de3 233the shared objects required by
eeb25d47
MK
234.IR myprog :
235
236.in +4n
237.nf
238$ \fBLD_ASSUME_KERNEL=2.2.5 ./myprog\fP
239.fi
240.in
241
43151de3 242On systems that provide multiple versions of a shared object
eeb25d47
MK
243(in different directories in the search path) that have
244different minimum kernel ABI version requirements,
245.BR LD_ASSUME_KERNEL
43151de3 246can be used to select the version of the object that is used
eeb25d47
MK
247(dependent on the directory search order).
248Historically, the most common use of the
8a94e783 249.BR LD_ASSUME_KERNEL
eeb25d47
MK
250feature was to manually select the older
251LinuxThreads POSIX threads implementation on systems that provided both
252LinuxThreads and NPTL
260c8fcd
MK
253(which latter was typically the default on such systems);
254see
255.BR pthreads (7).
eeb25d47 256.TP
9a741b5b 257.BR LD_BIND_NOW " (since glibc 2.1.1)"
aa796481 258If set to a nonempty string,
e1725521
MK
259causes the dynamic linker to resolve all symbols
260at program startup instead of deferring function call resolution to the point
261when they are first referenced.
262This is useful when using a debugger.
263.TP
fea681da 264.B LD_LIBRARY_PATH
75c2bb63 265A list of directories in which to search for
fea681da 266ELF libraries at execution-time.
75c2bb63 267The items in the list are separated by either colons or semicolons.
c13182ef 268Similar to the
fea681da
MK
269.B PATH
270environment variable.
578616fa 271
6e1064d3 272This variable is ignored in secure-execution mode.
0a8909c4
MK
273
274Within the pathnames specified in
275.BR LD_LIBRARY_PATH ,
99194a09 276the dynamic linker expands the tokens
0a8909c4
MK
277.IR $ORIGIN ,
278.IR $LIB ,
279and
280.IR $PLATFORM
281(or the versions using curly braces around the names)
282as described above in
283.IR "Rpath token expansion" .
284Thus, for example,
285the following would cause a library to be searched for in either the
286.I lib
287or
288.I lib64
289subdirectory below the directory containing the program to be executed:
290
291 $ \fBLD_LIBRARY_PATH='$ORIGIN/$LIB' prog\fP
292
293(Note the use of single quotes, which prevent expansion of
99194a09 294.I $ORIGIN
0a8909c4 295and
99194a09 296.I $LIB
0a8909c4 297as shell variables!)
fea681da
MK
298.TP
299.B LD_PRELOAD
df7ef267 300A list of additional, user-specified, ELF shared
43151de3 301objects to be loaded before all others.
df7ef267 302The items of the list can be separated by spaces or colons.
43151de3
MK
303This can be used to selectively override functions in other shared objects.
304The objects are searched for using the rules given under DESCRIPTION.
e9a13381 305
24fb0923 306In secure-execution mode,
be1cf739 307preload pathnames containing slashes are ignored.
8dd4941b 308Furthermore, shared objects are preloaded only
7c577be5 309from the standard search directories and and only
8fe4dd08 310if they have set-user-ID mode bit enabled (which is not typical).
0a8909c4 311
61c5564c
MK
312Within the names specified in the
313.BR LD_PRELOAD
99194a09 314list, the dynamic linker understands the tokens
0a8909c4
MK
315.IR $ORIGIN ,
316.IR $LIB ,
317and
318.IR $PLATFORM
319(or the versions using curly braces around the names)
320as described above in
321.IR "Rpath token expansion" .
8b2bb705
MK
322(See also the discussion of quoting under the description of
323.BR LD_LIBRARY_PATH .)
0a8909c4
MK
324.\" Tested with the following:
325.\"
326.\" LD_PRELOAD='$LIB/libmod.so' LD_LIBRARY_PATH=. ./prog
327.\"
376c2e1c 328.\" which will preload the libmod.so in 'lib' or 'lib64', using it
0a8909c4 329.\" in preference to the version in '.'.
fea681da 330.TP
dc4b358f 331.BR LD_TRACE_LOADED_OBJECTS
01132bd6 332If set (to any value), causes the program to list its dynamic
fea681da
MK
333dependencies, as if run by
334.BR ldd (1),
335instead of running normally.
336.LP
337Then there are lots of more or less obscure variables,
338many obsolete or only for internal use.
339.TP
9a741b5b 340.BR LD_AUDIT " (since glibc 2.4)"
54eb2620
PB
341A colon-separated list of user-specified, ELF shared objects
342to be loaded before all others in a separate linker namespace
343(i.e., one that does not intrude upon the normal symbol bindings that
344would occur in the process).
43151de3 345These objects can be used to audit the operation of the dynamic linker.
578616fa 346
54eb2620 347.B LD_AUDIT
24fb0923 348is ignored in secure-execution mode.
54eb2620
PB
349
350The dynamic linker will notify the audit
43151de3
MK
351shared objects at so-called auditing checkpoints\(emfor example,
352loading a new shared object, resolving a symbol,
54eb2620 353or calling a symbol from another shared object\(emby
43151de3 354calling an appropriate function within the audit shared object.
54eb2620
PB
355For details, see
356.BR rtld-audit (7).
357The auditing interface is largely compatible with that provided on Solaris,
358as described in its
359.IR "Linker and Libraries Guide" ,
360in the chapter
361.IR "Runtime Linker Auditing Interface" .
50994c10 362
61c5564c
MK
363Within the names specified in the
364.BR LD_AUDIT
99194a09 365list, the dynamic linker understands the tokens
879de6e7
MK
366.IR $ORIGIN ,
367.IR $LIB ,
368and
369.IR $PLATFORM
370(or the versions using curly braces around the names)
371as described above in
372.IR "Rpath token expansion" .
8b2bb705
MK
373(See also the discussion of quoting under the description of
374.BR LD_LIBRARY_PATH .)
879de6e7 375
50994c10
MK
376Since glibc 2.13,
377.\" commit 8e9f92e9d5d7737afdacf79b76d98c4c42980508
378in secure-execution mode,
379names in the audit list that contain slashes are ignored,
380and only shared objects in the standard search directories that
381have the set-user-ID mode bit enabled are loaded.
fea681da 382.TP
9a741b5b 383.BR LD_BIND_NOT " (since glibc 2.1.95)"
963c1947
MK
384If this environment variable is set to a nonempty string,
385do not update the GOT (global offset table) and PLT (procedure linkage table)
a3a72ad2 386after resolving a function symbol.
e5e9497f
MK
387By combining the use of this variable with
388.BR LD_DEBUG
389(with the categories
390.IR bindings
391and
392.IR symbols ),
393one can observe all run-time function bindings.
fea681da 394.TP
9a741b5b 395.BR LD_DEBUG " (since glibc 2.1)"
fea681da
MK
396Output verbose debugging information about the dynamic linker.
397If set to
a3fb5696
MK
398.BR all ,
399print all debugging information,
d81099fb
MK
400Setting this variable to
401.BR help
402does not run the specified program,
403and displays a help message about which categories can be specified in this
fea681da 404environment variable.
d81099fb
MK
405The categories are:
406.RS
407.TP 12
408.I bindings
409Display information about which definition each symbol is bound to.
410.TP
411.I files
412Display progress for input file.
413.TP
414.I libs
415Display library search paths.
416.TP
417.I reloc
418Display relocation processing.
419.TP
420.I scopes
421Display scope information.
422.TP
423.I statistics
424Display relocation statistics.
425.TP
426.I symbols
427Display search paths for each symbol look-up.
428.TP
429.I unused
430Determine unused DSOs.
431.TP
432.I versions
433Display version dependencies.
434.RE
435.IP
436The value in
437.BR LD_DEBUG
438can specify multiple categories, separated by colons, commas,
439or (if the value is quoted) spaces.
440
e4c14bd9
MK
441Since glibc 2.3.4,
442.B LD_DEBUG
ae861bf1
MG
443is ignored in secure-execution mode, unless the file
444.IR /etc/suid\-debug
445exists (the content of the file is irrelevant).
fea681da 446.TP
9a741b5b 447.BR LD_DEBUG_OUTPUT " (since glibc 2.1)"
70e26d29 448File in which
fea681da 449.B LD_DEBUG
70e26d29 450output should be written.
a3e50dc1 451The default is standard error.
578616fa 452
097585ed 453.B LD_DEBUG_OUTPUT
24fb0923 454is ignored in secure-execution mode.
fea681da 455.TP
9a741b5b 456.BR LD_DYNAMIC_WEAK " (since glibc 2.1.91)"
963c1947
MK
457If this environment variable is defined (with any value),
458allow weak symbols to be overridden (reverting to old glibc behavior).
c595ec7e
MK
459.\" See weak handling
460.\" https://www.sourceware.org/ml/libc-hacker/2000-06/msg00029.html
461.\" To: GNU libc hacker <libc-hacker at sourceware dot cygnus dot com>
462.\" Subject: weak handling
463.\" From: Ulrich Drepper <drepper at redhat dot com>
464.\" Date: 07 Jun 2000 20:08:12 -0700
465.\" Reply-To: drepper at cygnus dot com (Ulrich Drepper)
578616fa 466
6e1064d3 467Since glibc 2.3.4,
e1725521 468.B LD_DYNAMIC_WEAK
24fb0923 469is ignored in secure-execution mode.
e1725521 470.TP
9a741b5b 471.BR LD_HWCAP_MASK " (since glibc 2.1)"
e1725521
MK
472Mask for hardware capabilities.
473.TP
9a741b5b 474.BR LD_ORIGIN_PATH " (since glibc 2.1)"
71ffb3ed 475Path where the binary is found.
578616fa
MK
476.\" Used only if $ORIGIN can't be determined by normal means
477.\" (from the origin path saved at load time, or from /proc/self/exe)?
478
24fb0923 479Since glibc 2.4,
e1725521 480.B LD_ORIGIN_PATH
24fb0923 481is ignored in secure-execution mode.
7b0cacbb 482.TP
bdf75f3e 483.BR LD_POINTER_GUARD " (glibc from 2.4 to 2.22)"
7b0cacbb
PB
484Set to 0 to disable pointer guarding.
485Any other value enables pointer guarding, which is also the default.
486Pointer guarding is a security mechanism whereby some pointers to code
487stored in writable program memory (return addresses saved by
488.BR setjmp (3)
489or function pointers used by various glibc internals) are mangled
490semi-randomly to make it more difficult for an attacker to hijack
491the pointers for use in the event of a buffer overrun or
492stack-smashing attack.
ca1c3729
MK
493Since glibc 2.23,
494.\" commit a014cecd82b71b70a6a843e250e06b541ad524f7
495.B LD_POINTER_GUARD
496can no longer be used to disable pointer guarding,
497which is now always enabled.
fea681da 498.TP
9a741b5b 499.BR LD_PROFILE " (since glibc 2.1)"
7c7a7df3 500The name of a (single) shared object to be profiled,
8a7f3759 501specified either as a pathname or a soname.
c64ea262 502Profiling output is appended to the file whose name is:
8a7f3759 503"\fI$LD_PROFILE_OUTPUT\fP/\fI$LD_PROFILE\fP.profile".
24dc407a
MK
504
505Since glibc 2.2.5,
506.BR LD_PROFILE
507is ignored in secure execution mode.
fea681da 508.TP
9a741b5b 509.BR LD_PROFILE_OUTPUT " (since glibc 2.1)"
8a7f3759 510Directory where
fea681da 511.B LD_PROFILE
8a7f3759
MK
512output should be written.
513If this variable is not defined, or is defined as an empty string,
514then the default is
515.IR /var/tmp .
578616fa 516
097585ed 517.B LD_PROFILE_OUTPUT
8977c66c
MK
518is ignored in secure-execution mode; instead
519.IR /var/profile
520is always used.
24dc407a
MK
521(This detail is relevant only before glibc 2.2.5,
522since in later glibc versions,
523.B LD_PROFILE
524is also ignored in secure-execution mode.)
fea681da 525.TP
9a741b5b 526.BR LD_SHOW_AUXV " (since glibc 2.1)"
b5ccc9bb
MK
527If this environment variable is defined (with any value),
528show the auxiliary array passed up from the kernel (see also
529.BR getauxval (3)).
578616fa 530
24fb0923 531Since glibc 2.3.5,
ca2bcde1 532.B LD_SHOW_AUXV
24fb0923 533is ignored in secure-execution mode.
de2a932a 534.TP
9a741b5b 535.BR LD_TRACE_PRELINKING " (since glibc 2.4)"
f416bfde 536If this environment variable is defined,
a5817257 537trace prelinking of the object whose name is assigned to
de2a932a
MK
538this environment variable.
539(Use
540.BR ldd (1)
541to get a list of the objects that might be traced.)
542If the object name is not recognized,
543.\" (This is what seems to happen, from experimenting)
544then all prelinking activity is traced.
fea681da 545.TP
9a741b5b 546.BR LD_USE_LOAD_BIAS " (since glibc 2.3.3)"
e1725521
MK
547.\" http://sources.redhat.com/ml/libc-hacker/2003-11/msg00127.html
548.\" Subject: [PATCH] Support LD_USE_LOAD_BIAS
549.\" Jakub Jelinek
2656a3fa 550By default (i.e., if this variable is not defined),
e1725521 551executables and prelinked
43151de3 552shared objects will honor base addresses of their dependent shared objects
24b74457 553and (nonprelinked) position-independent executables (PIEs)
e1725521
MK
554and other shared objects will not honor them.
555If
556.B LD_USE_LOAD_BIAS
dc70d1ea 557is defined with the value 1, both executables and PIEs
e1725521
MK
558will honor the base addresses.
559If
560.B LD_USE_LOAD_BIAS
561is defined with the value 0,
562neither executables nor PIEs will honor the base addresses.
578616fa 563
24fb0923 564This variable is ignored in secure-execution mode.
fea681da 565.TP
9a741b5b 566.BR LD_VERBOSE " (since glibc 2.1)"
aa796481 567If set to a nonempty string,
e1725521 568output symbol versioning information about the
2216fac7 569program if the
e1725521 570.B LD_TRACE_LOADED_OBJECTS
2216fac7 571environment variable has been set.
fea681da 572.TP
dc4b358f 573.BR LD_WARN " (since glibc 2.1.3)
aa796481 574If set to a nonempty string, warn about unresolved symbols.
fea681da 575.TP
9a741b5b 576.BR LD_PREFER_MAP_32BIT_EXEC " (x86-64 only; since glibc 2.23)"
3cdc1fc4 577According to the Intel Silvermont software optimization guide, for 64-bit
5b479f37
L
578applications, branch prediction performance can be negatively impacted
579when the target of a branch is more than 4GB away from the branch.
3cdc1fc4
MK
580If this environment variable is set (to any value),
581.BR ld.so
582will first try to map executable pages using the
583.BR mmap (2)
584.BR MAP_32BIT
585flag, and fall back to mapping without that flag if that attempt fails.
81583be9 586NB: MAP_32BIT will map to the low 2GB (not 4GB) of the address space.
578616fa 587
3cdc1fc4
MK
588Because
589.B MAP_32BIT
590reduces the address range available for address space layout
591randomization (ASLR),
592.B LD_PREFER_MAP_32BIT_EXEC
593is always disabled in secure-execution mode.
fea681da
MK
594.SH FILES
595.PD 0
596.TP
8478ee02 597.I /lib/ld.so
fea681da
MK
598a.out dynamic linker/loader
599.TP
8478ee02 600.IR /lib/ld\-linux.so. { 1 , 2 }
fea681da
MK
601ELF dynamic linker/loader
602.TP
8478ee02 603.I /etc/ld.so.cache
fea681da 604File containing a compiled list of directories in which to search for
43151de3 605shared objects and an ordered list of candidate shared objects.
a110286b
MK
606See
607.BR ldconfig (8).
fea681da 608.TP
8478ee02 609.I /etc/ld.so.preload
43151de3 610File containing a whitespace-separated list of ELF shared objects to
fea681da 611be loaded before the program.
95b6bd72
MK
612See the discussion of
613.BR LD_PRELOAD
614above.
615If both
616.BR LD_PRELOAD
617and
618.I /etc/ld.so.preload
619are employed, the libraries specified by
620.BR LD_PRELOAD
621are preloaded first.
622.I /etc/ld.so.preload
623has a system-wide effect,
624causing the specified libraries to be preloaded for
625all programs that are executed on the system.
626(This is usually undesirable,
627and is typically employed only as an emergency remedy, for example,
628as a temporary workaround to a library misconfiguration issue.)
fea681da
MK
629.TP
630.B lib*.so*
43151de3 631shared objects
fea681da
MK
632.PD
633.SH NOTES
8ce45022 634.SS Hardware capabilities
43151de3 635Some shared objects are compiled using hardware-specific instructions which do
8ce45022 636not exist on every CPU.
43151de3 637Such objects should be installed in directories whose names define the
8ce45022
MK
638required hardware capabilities, such as
639.IR /usr/lib/sse2/ .
640The dynamic linker checks these directories against the hardware of the
43151de3 641machine and selects the most suitable version of a given shared object.
8ce45022
MK
642Hardware capability directories can be cascaded to combine CPU features.
643The list of supported hardware capability names depends on the CPU.
644The following names are currently recognized:
645.TP
646.B Alpha
647ev4, ev5, ev56, ev6, ev67
648.TP
649.B MIPS
650loongson2e, loongson2f, octeon, octeon2
651.TP
652.B PowerPC
6534xxmac, altivec, arch_2_05, arch_2_06, booke, cellbe, dfp, efpdouble, efpsingle,
654fpu, ic_snoop, mmu, notb, pa6t, power4, power5, power5+, power6x, ppc32, ppc601,
655ppc64, smt, spe, ucache, vsx
656.TP
657.B SPARC
658flush, muldiv, stbar, swap, ultra3, v9, v9v, v9v2
659.TP
660.B s390
661dfp, eimm, esan3, etf3enh, g5, highgprs, hpage, ldisp, msa, stfle,
662z900, z990, z9-109, z10, zarch
663.TP
664.B x86 (32-bit only)
665acpi, apic, clflush, cmov, cx8, dts, fxsr, ht, i386, i486, i586, i686, mca, mmx,
666mtrr, pat, pbe, pge, pn, pse36, sep, ss, sse, sse2, tm
fea681da 667.SH SEE ALSO
6b432477 668.BR ld (1),
fea681da 669.BR ldd (1),
1a7735bb 670.BR pldd (1),
cf28f98a 671.BR sprof (1),
639c8860 672.BR dlopen (3),
45fa8fcb 673.BR getauxval (3),
cef5dc27 674.BR elf (5),
9894eac3 675.BR capabilities (7),
c18ecec9 676.BR rtld-audit (7),
4d96fe33
MK
677.BR ldconfig (8),
678.BR sln (8)
fea681da
MK
679.\" .SH AUTHORS
680.\" ld.so: David Engel, Eric Youngdale, Peter MacDonald, Hongjiu Lu, Linus
681.\" Torvalds, Lars Wirzenius and Mitch D'Souza
682.\" ld-linux.so: Roland McGrath, Ulrich Drepper and others.
683.\"
684.\" In the above, (libc5) stands for David Engel's ld.so/ld-linux.so.