summaryrefslogtreecommitdiff
path: root/ldso/man/ldconfig.8
blob: 82285291fa53e56a318fbf0d4bc71c940c99c007 (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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
.TH ldconfig 8 "14 March 1998"
.SH NAME
ldconfig \- determine run-time link bindings
.SH SYNOPSIS
ldconfig
.RB [ \-DvqnNX ]
.RB [ \-f\ conf ]
.RB [ \-C\ cache ]
.RB [ \-r\ root ]
.IR directory \ ...
.PD 0
.PP
.PD
ldconfig
.B \-l
.RB [ \-Dvq ]
.IR library \ ...
.PD 0
.PP
.PD
ldconfig
.B \-p
.SH DESCRIPTION
.B ldconfig
creates the necessary links and cache (for use by the run-time linker,
.IR ld.so )
to the most recent shared libraries found in the directories specified
on the command line, in the file
.IR /etc/ld.so.conf ,
and in the trusted directories
.RI ( /usr/lib
and
.IR /lib ).
.B ldconfig
checks the header and file names of the libraries it encounters when
determining which versions should have their links updated.
.B ldconfig
ignores symbolic links when scanning for libraries. 
.PP
.B ldconfig
will attempt to deduce the type of ELF libs (ie. libc5 or libc6/glibc)
based on what C libs if any the library was linked against, therefore when
making dynamic libraries, it is wise to explicitly link against libc (use -lc).
.PP
Some existing libs do not contain enough information to allow the deduction of 
their type, therefore the 
.IR /etc/ld.so.conf 
file format allows the specification of an expected type.  This is 
.B only
used for those ELF libs which we can not work out. The format 
is like this "dirname=TYPE", where type can be libc4, libc5 or libc6.
(This syntax also works on the command line).  Spaces are 
.B not 
allowed.  Also see the 
.B -p 
option.
.PP 
Directory names containing an
.B = are no longer legal
unless they also have an expected type specifier.
.PP
.B ldconfig
should normally be run by the super-user as it may require write 
permission on some root owned directories and files.
It is normally run automatically at bootup, from /etc/rc, or manually
whenever new DLL's are installed.
.SH OPTIONS
.TP
.B \-D
Debug mode.
Implies
.B \-N
and
.BR \-X .
.TP
.B \-v
Verbose mode.
Print current version number, the name of each directory as it
is scanned and any links that are created.
Overrides quiet mode.
.TP
.B \-q
Quiet mode.
Don't print warnings.
.TP
.B \-n
Only process directories specified on the command line.
Don't process the trusted directories
.RI ( /usr/lib
and
.IR /lib )
nor those specified in
.IR /etc/ld.so.conf .
Implies
.BR \-N .
.TP
.B \-N
Don't rebuild the cache.
Unless
.B \-X
is also specified, links are still updated.
.TP
.B \-X
Don't update links.
Unless
.B \-N
is also specified, the cache is still rebuilt.
.TP
.B \-f conf
Use
.B conf
instead of
.IR /etc/ld.so.conf .
.TP
.B \-C cache
Use
.B cache
instead of
.IR /etc/ld.so.cache .
.TP
.B \-r root
Change to and use
.B root
as the root directory.
.TP
.B \-l
Library mode.
Manually link individual libraries.
Intended for use by experts only.
.TP
.B \-p
Print the lists of directories and candidate libraries stored in
the current cache.
.SH EXAMPLES
In the bootup file
.I /etc/rc
having the line
.RS

/sbin/ldconfig -v

.RE
will set up the correct links for the shared binaries and rebuild
the cache.
.TP
On the command line
.RS

# /sbin/ldconfig -n /lib

.RE
as root after the installation of a new DLL, will properly update the
shared library symbolic links in /lib.

.SH FILES
.PD 0
.TP 20
.B /lib/ld.so
execution time linker/loader
.TP 20
.B /etc/ld.so.conf
File containing a list of colon, space, tab, newline, or comma spearated
directories in which to search for libraries.
.TP 20
.B /etc/ld.so.cache
File containing an ordered list of libraries found in the directories
specified in
.BR /etc/ld.so.conf .
.TP
.B lib*.so.version
shared libraries
.PD
.SH SEE ALSO
.BR ldd (1),
.BR ld.so (8).
.SH BUGS
.LP
.BR ldconfig 's
functionality, in conjunction with
.BR ld.so ,
is only available for executables compiled using libc version 4.4.3 or greater.
.PP
.BR ldconfig ,
being a user process, must be run manually and has no means of dynamically
determining and relinking shared libraries for use by
.BR ld.so
when a new DLL is installed.
.SH AUTHORS
David Engel and Mitch D'Souza.