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