ldconfig.8 (e0dfecadf5946b6a8ad423be4eb1c14017b3a8a7) ldconfig.8 (484de86fbe4cf0b77e9cc15e8a6a656603b9174a)
1.\"
2.\" Copyright (c) 1993 Paul Kranenburg
3.\" All rights reserved.
4.\" Copyright (c) 2021 The FreeBSD Foundation, Inc.
5.\"
6.\" Portions of this documentation were written by
7.\" Konstantin Belousov <kib@FreeBSD.org> under sponsorship
8.\" from the FreeBSD Foundation.

--- 27 unchanged lines hidden (view full) ---

36.Dt LDCONFIG 8
37.Os
38.Sh NAME
39.Nm ldconfig
40.Nd configure the dynamic linker search path for shared libraries
41.Sh SYNOPSIS
42.Nm
43.Op Fl 32
1.\"
2.\" Copyright (c) 1993 Paul Kranenburg
3.\" All rights reserved.
4.\" Copyright (c) 2021 The FreeBSD Foundation, Inc.
5.\"
6.\" Portions of this documentation were written by
7.\" Konstantin Belousov <kib@FreeBSD.org> under sponsorship
8.\" from the FreeBSD Foundation.

--- 27 unchanged lines hidden (view full) ---

36.Dt LDCONFIG 8
37.Os
38.Sh NAME
39.Nm ldconfig
40.Nd configure the dynamic linker search path for shared libraries
41.Sh SYNOPSIS
42.Nm
43.Op Fl 32
44.Op Fl BRimrv
44.Op Fl BRimr
45.Op Fl f Ar hints_file
46.Op Ar directory | Ar
47.Sh DESCRIPTION
48.Nm
49utility is used to configure the set of paths used by the dynamic linker
50.Xr ld-elf.so.1 1
51when searching for shared libraries.
52The dynamic linker looks for libraries in a set of built-in system directories

--- 48 unchanged lines hidden (view full) ---

101.Nm :
102.Bl -tag -width indent
103.It Fl 32
104Generate the hints for 32-bit ABI shared libraries
105on 64-bit systems that support running 32-bit binaries.
106.It Fl elf
107Ignored for backwards compatibility.
108.It Fl B
45.Op Fl f Ar hints_file
46.Op Ar directory | Ar
47.Sh DESCRIPTION
48.Nm
49utility is used to configure the set of paths used by the dynamic linker
50.Xr ld-elf.so.1 1
51when searching for shared libraries.
52The dynamic linker looks for libraries in a set of built-in system directories

--- 48 unchanged lines hidden (view full) ---

101.Nm :
102.Bl -tag -width indent
103.It Fl 32
104Generate the hints for 32-bit ABI shared libraries
105on 64-bit systems that support running 32-bit binaries.
106.It Fl elf
107Ignored for backwards compatibility.
108.It Fl B
109Force writing big-endian binary data´to the hints file.
110The default is to create little-endian hints files on all architectures.
109Force writing big-endian binary data to the hints file.
110The default is to create hints files in the native byte-order of the host.
111Reading of and merging into hints files preserves the endianness of the
112existing hints file.
113.It Fl R
114Appends pathnames on the command line to the directory list from
115the hints file.
116.Pp
117This is the default action when no options are given.
118.It Fl f Ar hints_file

--- 7 unchanged lines hidden (view full) ---

126directories specified on the command line, merge existing list
127with the specified directories, and write the result to the hints file.
128.It Fl r
129List the current list of the directories from the hints file
130on the standard output.
131The hints file is not modified.
132.Pp
133Scan and print all libraries found on the directories list.
111Reading of and merging into hints files preserves the endianness of the
112existing hints file.
113.It Fl R
114Appends pathnames on the command line to the directory list from
115the hints file.
116.Pp
117This is the default action when no options are given.
118.It Fl f Ar hints_file

--- 7 unchanged lines hidden (view full) ---

126directories specified on the command line, merge existing list
127with the specified directories, and write the result to the hints file.
128.It Fl r
129List the current list of the directories from the hints file
130on the standard output.
131The hints file is not modified.
132.Pp
133Scan and print all libraries found on the directories list.
134.It Fl v
135Switch on verbose mode.
136.El
134.El
135.Pp
136The historic options
137.Fl elf ,
138.Fl s ,
139and
140.Fl v
141are accepted but ignored.
137.Sh SECURITY
138Special care must be taken when loading shared libraries into the address
139space of
140.Ev set-user-Id
141programs.
142Whenever such a program is run by any user except the owner of the program,
143the dynamic linker will only load shared libraries from paths found in
144the hints file.
145In particular, the
146.Ev LD_LIBRARY_PATH
147is not used to search for libraries.
148Thus,
149.Nm
150serves to specify the trusted collection of directories from which
151shared objects can be safely loaded.
152.Sh FILES
142.Sh SECURITY
143Special care must be taken when loading shared libraries into the address
144space of
145.Ev set-user-Id
146programs.
147Whenever such a program is run by any user except the owner of the program,
148the dynamic linker will only load shared libraries from paths found in
149the hints file.
150In particular, the
151.Ev LD_LIBRARY_PATH
152is not used to search for libraries.
153Thus,
154.Nm
155serves to specify the trusted collection of directories from which
156shared objects can be safely loaded.
157.Sh FILES
153.Bl -tag -width /var/run/ld-elf.so.hintsxxx -compact
158.Bl -tag -width /usr/local/libdata/ldconfig/* -compact
154.It Pa /var/run/ld-elf.so.hints
155Standard hints file for the ELF dynamic linker.
159.It Pa /var/run/ld-elf.so.hints
160Standard hints file for the ELF dynamic linker.
156.It Pa /etc/ld-elf.so.conf
157Conventional configuration file containing directory names for
158invocations with
159.Fl elf .
160.It Pa /var/run/ld-elf32.so.hints
161.It Pa /var/run/ld-elf32.so.hints
161Conventional configuration files containing directory names for
162invocations with
162Hints file for 32 bit libraries on 64 bit architectures, processed by
163ldconfig when invoked with
163.Fl 32 .
164.Fl 32 .
165.It Pa /etc/ld-elf.so.conf
166Optional file with names of directories to be included in the standard
167hints file when booting to multi-user mode.
168.It Pa /usr/local/libdata/ldconfig/*
169Additional files with names of directories provided by optional ports
170or packages.
164.El
165.Sh SEE ALSO
166.Xr ld 1 ,
167.Xr ld-elf.so.1 1 ,
168.Xr link 5
169.Sh HISTORY
170A
171.Nm
172utility first appeared in SunOS 4.0, it appeared in its current form
173in
174.Fx 1.1 .
175.Pp
176The name 'hints file' is historic from the times when the file also contained
177hints to the dynamic linker.
178This functionality is not provided for ELF.
171.El
172.Sh SEE ALSO
173.Xr ld 1 ,
174.Xr ld-elf.so.1 1 ,
175.Xr link 5
176.Sh HISTORY
177A
178.Nm
179utility first appeared in SunOS 4.0, it appeared in its current form
180in
181.Fx 1.1 .
182.Pp
183The name 'hints file' is historic from the times when the file also contained
184hints to the dynamic linker.
185This functionality is not provided for ELF.