Deleted Added
full compact
ldconfig.8 (1336) ldconfig.8 (1741)
1.Dd October 3, 1993
2.Dt LDCONFIG 8
3.Os FreeBSD 1.1
4.Sh NAME
5.Nm ldconfig
6.Nd configure the shared library cache
7.Sh SYNOPSIS
8.Nm ldconfig
9.Op Fl rsv
10.Op Ar directory Ar ...
11.Sh DESCRIPTION
12.Nm
13is used to prepare a set of
14.Dq hints
15for use by the run-time linker
16.Xr ld.so
17to facilitate quick lookup of shared libraries available in multiple
18directories. It scans a set of built-in system directories and any
19.Ar directories
20specified on the command line (in the given order) looking for shared
21libraries and stores the results in the file
22.Xr /var/run/ld.so.hints
23to forstall the overhead that would otherwise result from the
24directory search operations
25.Xr ld.so
26would have to perform to load the required shared libraries.
27.Pp
28The shared libraries so found will be automatically available for loading
29if needed by the program being prepared for execution. This obviates the need
30for storing search paths within the executable.
31.Pp
32The
33.Ev LD_LIBRARY_PATH
34environment variable can be used to override the use of
35directories (or the order thereof) from the cache or to specify additional
36directories where shared libraries might be found.
37.Ev LD_LIBRARY_PATH
38is a
39.Sq \:
40separated list of directory paths which are searched by
41.Xr ld.so
42when it needs to load a shared library. It can be viewed as the run-time
43equivalent of the
44.Fl L
45switch of
46.Xr ld.
47.Pp
48.Nm Ldconfig
49is typically run as part of the boot sequence.
50.Pp
51The following options recognized by
52.Nm ldconfig:
53.Bl -tag -width indent
54.It Fl r
55Lists the current contents of
56.Xr ld.so.hints
57on the standard output. The hints file will not be modified.
58.It Fl s
59Do not scan
60.Nm ldconfig
61\'s builtin system directories
62.Sq /usr/lib
63,
64.Sq /usr/X386/lib
1.Dd October 3, 1993
2.Dt LDCONFIG 8
3.Os FreeBSD 1.1
4.Sh NAME
5.Nm ldconfig
6.Nd configure the shared library cache
7.Sh SYNOPSIS
8.Nm ldconfig
9.Op Fl rsv
10.Op Ar directory Ar ...
11.Sh DESCRIPTION
12.Nm
13is used to prepare a set of
14.Dq hints
15for use by the run-time linker
16.Xr ld.so
17to facilitate quick lookup of shared libraries available in multiple
18directories. It scans a set of built-in system directories and any
19.Ar directories
20specified on the command line (in the given order) looking for shared
21libraries and stores the results in the file
22.Xr /var/run/ld.so.hints
23to forstall the overhead that would otherwise result from the
24directory search operations
25.Xr ld.so
26would have to perform to load the required shared libraries.
27.Pp
28The shared libraries so found will be automatically available for loading
29if needed by the program being prepared for execution. This obviates the need
30for storing search paths within the executable.
31.Pp
32The
33.Ev LD_LIBRARY_PATH
34environment variable can be used to override the use of
35directories (or the order thereof) from the cache or to specify additional
36directories where shared libraries might be found.
37.Ev LD_LIBRARY_PATH
38is a
39.Sq \:
40separated list of directory paths which are searched by
41.Xr ld.so
42when it needs to load a shared library. It can be viewed as the run-time
43equivalent of the
44.Fl L
45switch of
46.Xr ld.
47.Pp
48.Nm Ldconfig
49is typically run as part of the boot sequence.
50.Pp
51The following options recognized by
52.Nm ldconfig:
53.Bl -tag -width indent
54.It Fl r
55Lists the current contents of
56.Xr ld.so.hints
57on the standard output. The hints file will not be modified.
58.It Fl s
59Do not scan
60.Nm ldconfig
61\'s builtin system directories
62.Sq /usr/lib
63,
64.Sq /usr/X386/lib
65,
66.Sq /usr/X11R6/lib
65and
66.Sq /usr/local/lib
67for shared libraries.
68.It Fl v
69Switch on verbose mode.
70.Sh Security
71Special care must be taken when loading shared libraries into the address
72space of
73.Ev set-user-Id
74programs. Whenever such a program is run,
75.Xr ld.so
76will only load shared libraries from the
77.Ev ld.so.hints
78file. In particular, the
79.Ev LD_LIBRARY_PATH
80is not used to search for libraries. Thus, the role of ldconfig is dual. In
81addition to building a set of hints for quick lookup, it also serves to
82specify the trusted collection of directories from which shared objects can
83be safely loaded. It is presumed that the set of directories specified to
84.Nm ldconfig
85are under control of the system's administrator.
86.Xr ld.so
87further assists set-user-Id programs by erasing the
88.Ev LD_LIBRARY_PATH
89from the environment.
90
91.Sh FILES
92.Xr /var/run/ld.so.hints
93.Sh SEE ALSO
94.Xr ld 1 ,
95.Xr link 5
96.Sh HISTORY
97A
98.Nm
99utility first appeared in SunOS 4.0, it appeared in its current form
100in FreeBSD 1.1.
67and
68.Sq /usr/local/lib
69for shared libraries.
70.It Fl v
71Switch on verbose mode.
72.Sh Security
73Special care must be taken when loading shared libraries into the address
74space of
75.Ev set-user-Id
76programs. Whenever such a program is run,
77.Xr ld.so
78will only load shared libraries from the
79.Ev ld.so.hints
80file. In particular, the
81.Ev LD_LIBRARY_PATH
82is not used to search for libraries. Thus, the role of ldconfig is dual. In
83addition to building a set of hints for quick lookup, it also serves to
84specify the trusted collection of directories from which shared objects can
85be safely loaded. It is presumed that the set of directories specified to
86.Nm ldconfig
87are under control of the system's administrator.
88.Xr ld.so
89further assists set-user-Id programs by erasing the
90.Ev LD_LIBRARY_PATH
91from the environment.
92
93.Sh FILES
94.Xr /var/run/ld.so.hints
95.Sh SEE ALSO
96.Xr ld 1 ,
97.Xr link 5
98.Sh HISTORY
99A
100.Nm
101utility first appeared in SunOS 4.0, it appeared in its current form
102in FreeBSD 1.1.