2 .\" Copyright (c) 1993 Paul Kranenburg
3 .\" All rights reserved.
4 .\" Copyright (c) 2021 The FreeBSD Foundation, Inc.
6 .\" Portions of this documentation were written by
7 .\" Konstantin Belousov <kib@FreeBSD.org> under sponsorship
8 .\" from the FreeBSD Foundation.
10 .\" Redistribution and use in source and binary forms, with or without
11 .\" modification, are permitted provided that the following conditions
13 .\" 1. Redistributions of source code must retain the above copyright
14 .\" notice, this list of conditions and the following disclaimer.
15 .\" 2. Redistributions in binary form must reproduce the above copyright
16 .\" notice, this list of conditions and the following disclaimer in the
17 .\" documentation and/or other materials provided with the distribution.
18 .\" 3. All advertising materials mentioning features or use of this software
19 .\" must display the following acknowledgement:
20 .\" This product includes software developed by Paul Kranenburg.
21 .\" 3. The name of the author may not be used to endorse or promote products
22 .\" derived from this software without specific prior written permission
24 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
25 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
26 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
27 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
28 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42 .Nd configure the dynamic linker search path for shared libraries
47 .Op Fl f Ar hints_file
51 utility is used to configure the set of paths used by the dynamic linker
53 when searching for shared libraries.
54 The dynamic linker looks for libraries in a set of built-in system directories
55 and any directories specified in the hints file.
56 This obviates the need for storing search paths within the executable,
59 option for the static linker
62 The hints file is maintained by
66 list to be stored in the hints file is supplied on the command line.
70 list on the command line,
72 may be specified; these are expected to contain directories
73 to scan for shared libraries.
74 Each directory's pathname must start on a new
76 Blank lines and lines starting with the comment character
80 For security reasons, directories which are world or group-writable or which
81 are not owned by root produce warning messages and are skipped, unless
88 environment variable can be used to specify additional
89 shared library search directories.
93 separated list of directory paths which are searched by
95 when it needs to load a shared library.
96 It can be viewed as the run-time
102 The following options are recognized by
104 .Bl -tag -width indent
106 Generate the hints for 32-bit ABI shared libraries
107 on 64-bit systems that support running 32-bit binaries.
109 Ignored for backwards compatibility.
111 Appends pathnames on the command line to the directory list from
114 This is the default action when no options are given.
115 .It Fl f Ar hints_file
116 Read and/or update the specified hints file, instead of the standard file.
117 This option is provided primarily for testing.
119 Run in insecure mode.
120 The security checks will not be performed.
122 Instead of replacing the list of the directories to search with the
123 directories specified on the command line, merge existing list
124 with the specified directories, and write the result to the hints file.
126 List the current list of the directories from the hints file
127 on the standard output.
128 The hints file is not modified.
130 Scan and print all libraries found on the directories list.
132 Switch on verbose mode.
135 Special care must be taken when loading shared libraries into the address
139 Whenever such a program is run by any user except the owner of the program,
140 the dynamic linker will only load shared libraries from paths found in
144 is not used to search for libraries.
147 serves to specify the trusted collection of directories from which
148 shared objects can be safely loaded.
150 .Bl -tag -width /var/run/ld-elf.so.hintsxxx -compact
151 .It Pa /var/run/ld-elf.so.hints
152 Standard hints file for the ELF dynamic linker.
153 .It Pa /etc/ld-elf.so.conf
154 Conventional configuration file containing directory names for
157 .It Pa /var/run/ld-elf32.so.hints
158 Conventional configuration files containing directory names for
169 utility first appeared in SunOS 4.0, it appeared in its current form
173 The name 'hints file' is historic from the times when the file also contained
174 hints to the dynamic linker.
175 This functionality is not provided for ELF.