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