1.\"	$OpenBSD: prebind.8,v 1.1 2006/05/12 23:20:52 deraadt Exp $
2.\"
3.\" Copyright (c) 2006 Dale Rahn <drahn@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd May 1, 2006
18.Dt PREBIND 8
19.Os
20.Sh NAME
21.Nm prebind
22.Nd cache symbol lookup information to speed up dynamic linking
23.Sh SYNOPSIS
24.Nm prebind
25.Op Fl mv
26.Op Ar file/dir ...
27.Sh DESCRIPTION
28.Nm
29parses each of the specified files or directories and processes each ELF file
30(ELF file found in the directory) and the associated
31.Dv DT_NEEDED
32libraries,
33and writes symbol resolution hint information to each binary and library.
34.Pp
35.Nm
36will add data to the programs specified and any libraries they reference
37to speed up dynamic linking.
38Since version information is stored in the libraries to validate the
39prebind info, running
40.Nm
41on a subset of programs it was previously
42run on will invalidate the prebind info for those excluded binaries.
43The
44.Fl m
45option will preserve the old prebind info in any library if present.
46.Pp
47The options are as follows:
48.Bl -tag -width Ds
49.It Fl m
50Merge into existing prebound libraries.
51This prebinds new binaries without modifying or updating the libraries
52(if prebind data is present), allowing old prebound binaries to continue
53to use the old prebind data.
54.It Fl v
55Be verbose when running
56.Nm :
57prints out information about the file/library that is being processed.
58.El
59.Sh SEE ALSO
60.Xr ld.so 1 ,
61.Xr prebind_strip 8
62.Sh STANDARDS
63None
64.Sh HISTORY
65The
66.Nm
67utility first appeared in
68.Ox 4.0 .
69.Nm
70is based loosely on Prelinking, however prelink removes the security
71feature of libraries appearing in random order on each invocation, thus
72it was incompatible with
73.Ox Ns 's
74goals.
75.Nm
76was written as an attempt to improve the speed of dynamic linking
77without the penalty of loss of security features.
78.Sh BUGS
79Prebind uses a lot of memory depending on how many files/libraries
80are being processed.
81Handling of binaries where a required library has been removed is poor.
82