1 |
perry |
1 |
ld.so |
|
|
2 |
!!!ld.so |
|
|
3 |
NAME |
|
|
4 |
DESCRIPTION |
|
|
5 |
ENVIRONMENT |
|
|
6 |
FILES |
|
|
7 |
SEE ALSO |
|
|
8 |
BUGS |
|
|
9 |
AUTHORS |
|
|
10 |
---- |
|
|
11 |
!!NAME |
|
|
12 |
|
|
|
13 |
|
|
|
14 |
ld.so/ld-linux.so - dynamic linker/loader |
|
|
15 |
!!DESCRIPTION |
|
|
16 |
|
|
|
17 |
|
|
|
18 |
__ld.so__ loads the shared libraries needed by a program, |
|
|
19 |
prepares the program to run, and then runs it. Unless |
|
|
20 |
explicitly specified via the __-static__ option to |
|
|
21 |
__ld__ during compilation, all Linux programs are |
|
|
22 |
incomplete and require further linking at run |
|
|
23 |
time. |
|
|
24 |
|
|
|
25 |
|
|
|
26 |
The necessary shared libraries needed by the program are |
|
|
27 |
searched for in the following order |
|
|
28 |
|
|
|
29 |
|
|
|
30 |
o |
|
|
31 |
|
|
|
32 |
|
|
|
33 |
Using the environment variable __LD_LIBRARY_PATH__ |
|
|
34 |
(__LD_AOUT_LIBRARY_PATH__ for a.out programs). Except if |
|
|
35 |
the executable is a setuid/setgid binary, in which case it |
|
|
36 |
is ignored. |
|
|
37 |
|
|
|
38 |
|
|
|
39 |
o |
|
|
40 |
|
|
|
41 |
|
|
|
42 |
From the cache file __/etc/ld.so.cache__ which contains a |
|
|
43 |
compiled list of candidate libraries previously found in the |
|
|
44 |
augmented library path. |
|
|
45 |
|
|
|
46 |
|
|
|
47 |
o |
|
|
48 |
|
|
|
49 |
|
|
|
50 |
In the default path __/usr/lib__, and then |
|
|
51 |
__/lib__. |
|
|
52 |
!!ENVIRONMENT |
|
|
53 |
|
|
|
54 |
|
|
|
55 |
__LD_LIBRARY_PATH__ |
|
|
56 |
|
|
|
57 |
|
|
|
58 |
A colon-separated list of directories in which to search for |
|
|
59 |
ELF libraries at execution-time. Similar to the __PATH__ |
|
|
60 |
environment variable. |
|
|
61 |
|
|
|
62 |
|
|
|
63 |
__LD_PRELOAD__ |
|
|
64 |
|
|
|
65 |
|
|
|
66 |
A whitespace-separated list of additional, user-specified, |
|
|
67 |
ELF shared libraries to be loaded before all others. This |
|
|
68 |
can be used to selectively override functions in other |
|
|
69 |
shared libraries. For setuid/setgid ELF binaries, only |
|
|
70 |
libraries in the standard search directories that are also |
|
|
71 |
setgid will be loaded. |
|
|
72 |
|
|
|
73 |
|
|
|
74 |
__LD_TRACE_LOADED_OBJECTS__ |
|
|
75 |
|
|
|
76 |
|
|
|
77 |
If present, causes the program to list its dynamic library |
|
|
78 |
dependencies, as if run by ldd, instead of running |
|
|
79 |
normally. |
|
|
80 |
|
|
|
81 |
|
|
|
82 |
__LD_BIND_NOW__ |
|
|
83 |
|
|
|
84 |
|
|
|
85 |
If present, causes the dynamic linker to resolve all symbols |
|
|
86 |
at program startup instead of when they are first |
|
|
87 |
referenced. |
|
|
88 |
|
|
|
89 |
|
|
|
90 |
__LD_AOUT_LIBRARY_PATH__ |
|
|
91 |
|
|
|
92 |
|
|
|
93 |
A colon-separated list of directories in which to search for |
|
|
94 |
a.out libraries at execution-time. Similar to the |
|
|
95 |
__PATH__ environment variable. |
|
|
96 |
|
|
|
97 |
|
|
|
98 |
__LD_AOUT_PRELOAD__ |
|
|
99 |
|
|
|
100 |
|
|
|
101 |
The name of an additional, user-specified, a.out shared |
|
|
102 |
library to be loaded after all others. This can be used to |
|
|
103 |
selectively override functions in other shared |
|
|
104 |
libraries. |
|
|
105 |
|
|
|
106 |
|
|
|
107 |
__LD_NOWARN__ |
|
|
108 |
|
|
|
109 |
|
|
|
110 |
Suppress warnings about a.out libraries with incompatible |
|
|
111 |
minor version numbers. |
|
|
112 |
|
|
|
113 |
|
|
|
114 |
__LD_KEEPDIR__ |
|
|
115 |
|
|
|
116 |
|
|
|
117 |
Don't ignore the directory in the names of a.out libraries |
|
|
118 |
to be loaded. Use of this option is strongly |
|
|
119 |
discouraged. |
|
|
120 |
!!FILES |
|
|
121 |
|
|
|
122 |
|
|
|
123 |
__/lib/ld.so__ a.out dynamic linker/loader |
|
|
124 |
|
|
|
125 |
|
|
|
126 |
__/lib/ld-linux.so.*__ |
|
|
127 |
|
|
|
128 |
|
|
|
129 |
ELF dynamic linker/loader |
|
|
130 |
|
|
|
131 |
|
|
|
132 |
__/etc/ld.so.cache__ |
|
|
133 |
|
|
|
134 |
|
|
|
135 |
File containing a compiled list of directories in which to |
|
|
136 |
search for libraries and an ordered list of candidate |
|
|
137 |
libraries. |
|
|
138 |
|
|
|
139 |
|
|
|
140 |
__/etc/ld.so.preload__ |
|
|
141 |
|
|
|
142 |
|
|
|
143 |
File containing a whitespace separated list of ELF shared |
|
|
144 |
libraries to be loaded before the program. libraries and an |
|
|
145 |
ordered list of candidate libraries. |
|
|
146 |
|
|
|
147 |
|
|
|
148 |
__lib*.so*__ shared libraries |
|
|
149 |
!!SEE ALSO |
|
|
150 |
|
|
|
151 |
|
|
|
152 |
ldd(1), ldconfig(8). |
|
|
153 |
!!BUGS |
|
|
154 |
|
|
|
155 |
|
|
|
156 |
Currently __ld.so__ has no means of unloading and |
|
|
157 |
searching for compatible or newer version of |
|
|
158 |
libraries. |
|
|
159 |
|
|
|
160 |
|
|
|
161 |
__ld.so__ functionality is only available for executables |
|
|
162 |
compiled using libc version 4.4.3 or greater. |
|
|
163 |
!!AUTHORS |
|
|
164 |
|
|
|
165 |
|
|
|
166 |
David Engel, Eric Youngdale, Peter !MacDonald, Hongjiu Lu, |
|
|
167 |
Linus Torvalds, Lars Wirzenius and Mitch D'Souza (not |
|
|
168 |
necessarily in that order). |
|
|
169 |
---- |