.\" $OpenBSD: prebind.8,v 1.1 2006/05/12 23:20:52 deraadt Exp $ .\" .\" Copyright (c) 2006 Dale Rahn .\" .\" 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.