2 .\" Copyright (c) 1993 Paul Kranenburg
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
13 .\" 3. All advertising materials mentioning features or use of this software
14 .\" must display the following acknowledgement:
15 .\" This product includes software developed by Paul Kranenburg.
16 .\" 3. The name of the author may not be used to endorse or promote products
17 .\" derived from this software without specific prior written permission
19 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 .\" $FreeBSD: src/sbin/ldconfig/ldconfig.8,v 1.19.2.10 2003/05/13 19:25:19 trhodes Exp $
37 .Nd configure the shared library cache
42 .Op Fl f Ar hints_file
47 utility is used to prepare a set of
49 for use by the dynamic linker
50 to facilitate quick lookup of shared libraries available in multiple
52 It scans a set of built-in system directories and any
54 specified on the command line (in the given order) looking for
55 shared libraries and stores the results in a system file to forestall
56 the overhead that would otherwise result from the directory search
57 operations the dynamic linker would have to perform to load the
58 required shared libraries.
62 may be specified; these are expected to contain directories
63 to scan for shared libraries.
64 Each directory's pathname must start on a new
66 Blank lines and lines starting with the comment character
69 Filenames must conform to the
71 pattern in order to be added to the hints file.
73 For security reasons, directories which are world or group-writable or which
74 are not owned by root produce warning messages and are skipped, unless
79 The shared libraries which are found will be automatically available for loading
80 if needed by the program being prepared for execution.
81 This obviates the need
82 for storing search paths within the executable.
86 environment variable can be used to override the use of
87 directories (or the order thereof) from the cache or to specify additional
88 directories where shared libraries might be found.
92 separated list of directory paths which are searched by
94 when it needs to load a shared library.
95 It can be viewed as the run-time
103 utility is typically run as part of the boot sequence.
105 The following options are recognized by
107 .Bl -tag -width indent
109 Generate the hints for ELF format shared libraries.
111 Rescan the previously configured directories.
112 This opens the previous hints
113 file and fetches the directory list from the header.
114 Any additional pathnames
115 on the command line are also processed.
116 This is the default action when no parameters are given.
117 .It Fl f Ar hints_file
118 Read and/or update the specified hints file, instead of the standard file.
119 This option is provided primarily for testing.
121 Run in insecure mode.
122 The security checks will not be performed.
124 Instead of replacing the contents of the hints file
125 with those found in the directories specified,
128 Directories recorded in the hints file by previous runs of
130 are also rescanned for new shared libraries.
132 List the current contents of the hints file
133 on the standard output.
134 The hints file is not modified.
136 directories stored in the hints file is included.
138 Ignored for compatibility with other operating systems.
141 Special care must be taken when loading shared libraries into the address
145 Whenever such a program is run by any user except the owner of the program,
147 will only load shared libraries from the hints
151 is not used to search for libraries.
155 In addition to building a set of hints for quick lookup, it also serves to
156 specify the trusted collection of directories from which shared objects can
159 .Bl -tag -width /var/run/ld-elf.so.hintsxxx -compact
160 .It Pa /var/run/ld-elf.so.hints
161 Standard hints file for the ELF dynamic linker.
162 .It Pa /etc/ld-elf.so.conf
163 Conventional configuration file containing directory names for
173 utility first appeared in SunOS 4.0, it appeared in its current form