summaryrefslogtreecommitdiff
path: root/ldso/man/ld.so.8
blob: 59ec8530d19e88c094733ab4e78c91447efa9434 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
.TH ld.so 8 "14 March 1998"
.SH NAME
ld.so/ld-linux.so \- dynamic linker/loader
.SH DESCRIPTION
.B ld.so
loads the shared libraries needed by a program, prepares the program
to run, and then runs it.
Unless explicitly specified via the
.B \-static
option to
.B ld
during compilation, all Linux programs are incomplete and require 
further linking at run time.
.PP
The necessary shared libraries needed by the program are searched for 
in the following order
.IP o
Using the environment variable
.B LD_LIBRARY_PATH
.RB ( LD_AOUT_LIBRARY_PATH
for a.out programs).
Except if the executable is a setuid/setgid binary, in which case it
is ignored.
.IP o
From the cache file
.BR /etc/ld.so.cache
which contains a compiled list of candidate libraries previously found
in the augmented library path.
.IP o
In the default path
.BR /usr/lib ,
and then
.BR /lib .
.SH ENVIRONMENT
.TP
.B LD_LIBRARY_PATH
A colon-separated list of directories in which to search for
ELF libraries at execution-time.
Similar to the 
.B PATH
environment variable.
.TP
.B LD_PRELOAD
A whitespace-separated list of additional, user-specified, ELF shared 
libraries to be loaded before all others.
This can be used to selectively override functions in other shared libraries.
For setuid/setgid ELF binaries, only libraries in the standard search
directories that are also setgid will be loaded.
.TP
.B LD_TRACE_LOADED_OBJECTS
If present, causes the program to list its dynamic library dependencies,
as if run by ldd, instead of running normally.
.TP
.B LD_BIND_NOW
If present, causes the dynamic linker to resolve all symbols at program
startup instead of when they are first referenced.
.TP
.B LD_AOUT_LIBRARY_PATH
A colon-separated list of directories in which to search for
a.out libraries at execution-time.
Similar to the 
.B PATH
environment variable.
.TP
.B LD_AOUT_PRELOAD
The name of an additional, user-specified, a.out shared library to be loaded 
after all others.
This can be used to selectively override functions in other shared libraries.
.TP
.B LD_NOWARN
Suppress warnings about a.out libraries with incompatible minor 
version numbers.
.TP
.B LD_KEEPDIR
Don't ignore the directory in the names of a.out libraries to be loaded.
Use of this option is strongly discouraged.
.SH FILES
.PD 0
.TP 20
.B /lib/ld.so
a.out dynamic linker/loader
.TP 20
.B /lib/ld-linux.so.*
ELF dynamic linker/loader
.TP
.B /etc/ld.so.cache
File containing a compiled list of directories in which to search for
libraries and an ordered list of candidate libraries.
.TP
.B /etc/ld.so.preload
File containing a whitespace separated list of ELF shared libraries to
be loaded before the program.
libraries and an ordered list of candidate libraries.
.TP
.B lib*.so*
shared libraries
.PD
.SH SEE ALSO
.BR ldd (1),
.BR ldconfig (8).
.SH BUGS
.LP
Currently
.B ld.so
has no means of unloading and searching for compatible or newer version of
libraries.
.PP
.B ld.so
functionality is only available for executables compiled using libc version
4.4.3 or greater.
.SH AUTHORS
David Engel, Eric Youngdale, Peter MacDonald, Hongjiu Lu, Linus
Torvalds, Lars Wirzenius and Mitch D'Souza (not necessarily in that order).