xref: /freebsd/share/man/man5/libmap.conf.5 (revision 77b7cdf1999ee965ad494fddd184b18f532ac91a)
1.\" Copyright (c) 2003 Matthew N. Dodd <winter@jurai.net>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.\" Note: The date here should be updated whenever a non-trivial
28.\" change is made to the manual page.
29.Dd April 7, 2003
30.Dt LIBMAP.CONF 5
31.Os
32.Sh NAME
33.Nm libmap.conf
34.Nd "configuration file for dynamic object dependency mapping"
35.Sh DESCRIPTION
36The
37.Em libmap
38functionality of
39.Nm ld-elf.so.1
40allows dynamic object dependencies to be mapped to arbitrary
41names.
42.Pp
43The configuration file consists of two whitespace separated columns; the
44left hand side containing the mapping candidate and the right hand
45side containing the mapping.  Dependencies are matched against candidates
46and replaced with the mappings.
47.Pp
48Constrained mappings may be specified by enclosing the name of the
49executable or library in brackets.  All mappings following a constraint
50will only be evaluated for that constraint.  Currently, constraints
51are matched literally so that an executable with a fully qualified pathname
52will only match the same constraint.  This means that
53.Em /usr/bin/foo
54will not match a constraint for
55.Em foo
56and vise-versa.
57.Pp
58WARNING!  Constrained mappings must never appear first in the configuration
59file.  While there is a way to specify the
60.Dq default
61constraint, its use is not recommended.
62.Pp
63The most common use at the date of writing is for allowing multiple
64POSIX threading libraries to be used on a system without relinking or
65changing symlinks.
66.Pp
67In order to enable this feature please see
68.Pa src/libexec/rtld-elf/Makefile .
69.Sh EXAMPLE
70.Bd -literal
71
72# /etc/libmap.conf
73#
74# candidate		mapping
75#
76libc_r.so.5		libthr.so.1	# Everything uses 'libthr'
77libc_r.so		libthr.so
78
79[/usr/local/bin/mplayer]		# 'mplayer' uses libc_r.
80libc_r.so.5		libc_r.so.5
81libc_r.so		libc_r.so
82
83[mplayer]
84libc_r.so.5		libc_r.so.5
85libc_r.so		libc_r.so
86
87[/usr/local/sbin/httpd]			# Apache uses libkse
88libc_r.so.5		libkse.so.1
89libc_r.so		libkse.so
90
91[httpd]
92libc_r.so.5		libkse.so.1
93libc_r.so		libkse.so
94.Ed
95.Sh FILES
96.Bl -tag -width ".Pa /etc/libmap.conf" -compact
97.It Pa /etc/libmap.conf
98The libmap configuration file.
99.El
100.Sh SEE ALSO
101.Xr rtld 1
102.Xr ldd 1
103.Sh HISTORY
104The
105.Nm
106manual page and libmap.conf functionality first appeared in
107.Fx 5.1 .
108.Sh AUTHORS
109This
110manual page was written by
111.An Matthew N. Dodd <winter@jurai.net> .
112