1 .\" Copyright (c) 2003 Matthew N. Dodd <winter@jurai.net>
2 .\" Copyright (c) 2013 Dag-Erling Smørgrav
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.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .Dd September 16, 2013
33 .Nd "configuration file for dynamic object dependency mapping"
39 allows dynamic object dependencies to be mapped to arbitrary names.
43 can have one of five forms:
44 .Bl -tag -width indent
45 .It Ar origin Ar target
46 Whenever a dependency on
48 is encountered while loading a dynamic object, use
50 instead of searching for
52 in the normal library search paths.
54 When iterating through a library search path, replace any element that
62 to all subsequent mappings until the next constraint line or the end
67 .It Cm include Ar file
70 before continuing with the current file.
71 Nesting depth is limited only by available memory, but each file
72 encountered is processed only once, and loops are silently ignored.
73 .It Cm includedir Ar dir
76 and parse the contents of any file that ends in
78 before continuing with the current file.
79 Nesting depth is limited only by available memory, but each directory
80 or file encountered is processed only once, and loops are silently
84 Constrained mappings only apply when processing binaries or libraries
85 that satisfy the constraint.
86 There are three types of constraints:
87 .Bl -tag -width indent
89 The constraint is matched literally so that only an executable with an
90 identical fully qualified pathname will satisfy the constraint.
91 This means that the executable
93 will not satisfy the constraint
94 .Bq Pa /usr/bin/./foo ,
96 This is the default constraint type.
98 A constraint with no path is matched against the basename of the
100 For instance, the constraint
104 .Pa /usr/local/sbin/foo ,
105 or any other executable named
107 no matter what directory it is in.
109 A constraint with a trailing slash is satisfied if the full pathname
110 begins with the constraint string.
111 For instance, the constraint
113 will match any executable with a path starting with
117 Note that the constraints are matched against the path that was passed
118 as the first argument to whichever
120 function was used to execute the binary in question.
121 Most programs executed from a shell are run without a full path, via
123 or similar, so the basename constraint type is the most useful.
127 Constraints apply to all mappings until the next constraint or the end
129 Hence, unconstrained mappings must be placed at the top of the file.
131 .Ss ABI compatibility
132 On 64-bit architectures that provide 32-bit binary compatibility, the
135 apply only to 64-bit binaries.
136 Mappings for 32-bit binaries must be placed in
137 .Pa /etc/libmap32.conf .
139 .Bl -tag -width ".Pa /etc/libmap32.conf" -compact
140 .It Pa /etc/libmap.conf
141 The libmap configuration file.
142 .It Pa /etc/libmap32.conf
143 The libmap configuration file for 32-bit binaries on 64-bit system.
150 libc_r.so.6 libpthread.so.2 # Everything that uses 'libc_r'
151 libc_r.so libpthread.so # now uses 'libpthread'
153 [/tmp/mplayer] # Test version of mplayer uses libc_r
154 libpthread.so.2 libc_r.so.6
155 libpthread.so libc_r.so
157 [/usr/local/jdk1.4.1/] # All Java 1.4.1 programs use libthr
158 # This works because "javavms" executes
159 # programs with the full pathname
160 libpthread.so.2 libthr.so.2
161 libpthread.so libthr.so
163 # Glue for Linux-only EPSON printer .so to be loaded into cups, etc.
164 [/usr/local/lib/pips/libsc80c.so]
165 libc.so.6 pluginwrapper/pips.so
166 libdl.so.2 pluginwrapper/pips.so
174 mechanism first appeared in
177 This manual page was written by
178 .An Matthew N. Dodd Aq winter@jurai.net
179 and extensively rewritten by
180 .An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org .