update_prebinding(1) BSD General Commands Manual update_prebinding(1)
NAME
update_prebinding - Update prebinding information for newly changed files
SYNOPSIS
update_prebinding -root directory [-debug] [-force] [-pkgs package-name install-location ...] [-files filename ...]
DESCRIPTION
update_prebinding tries to synchronize prebinding information for libraries and executables when new files are added to a system. Prebind- ing information is pre-calculated address information for libraries used by a given executable or library. By pre-determining where a function in another library is destined to be placed, the dynamic linker does not have to resolve symbols at application startup time, and the application can launch faster. Because each recompilation of a library or executable may place functions at different addresses, a newly installed library or executable's pre- binding information might not match the libraries already on the disk. When the dynamic linker determines that prebinding information for a library could be invalid, it defaults to resolving all the names for that library, and for all libraries referenced by that library, losing any advantage of having the prebinding information. update_prebinding ensures that prebinding information is up-to-date after new prebound applications or new versions of system libraries are installed. Given a list of the newly installed files in a package, update_prebinding finds all the libraries and executables that may dynam- ically load the changed files. If so, the prebinding information must be updated, and update_prebinding performs redo_prebinding to update that file. update_prebinding builds a dependency graph to minimize the files that must be updated, and applies a few other heuristics to only call redo_prebinding when necessary. The root argument specifies the directory tree to search for changed files. This is usually the root directory. update_prebinding will look for dependent libraries and executables within this directory hierarchy, but will not go to different file systems. The argument allows you to update prebinding information for a specific file to match a non-running version of the operating system on another partition. update_prebinding uses the root to find the system libraries for that version of the OS. The root argument is not intended to limit update_prebinding's effect to a particular set of executables; instead, you must specify the changed files using -files or -pkgs. The pkgs argument specifies the packages containing the files to be updated. update_prebinding uses this list to determine the files that must change, and thus identify the scope of updates necessary. After the option name, list every package that changed, along with its install root so that update_prebinding can find the newly installed files. If no packages are named on the command line, then update_prebinding scans the entire directory hierarchy from the named root looking for exe- cutables, then prebinds all executables from least dependent to most. The files option allows a list of changed files to be provided as subse- quent arguments instead of a list of packages. Any libraries or executa- bles in the root directory that depend on these files will also be re- prebound. The debug option does not actually change prebinding, but merely goes through the effort of figuring out what will change, and lists the files it would update if allowed. By default, update_prebinding only changes a file if the prebinding is out of date. The -force option ensures that all files examined are re- prebound, even if the prebinding is otherwise up-to-date. The command update_prebinding -root / -force will prebind all binaries on the root volume, even if otherwise correct.
Issues
update_prebinding (and redo_prebinding) only work on applications and libraries that have been compiled and linked with the prebinding informa- tion added. Applications that have not been prebound still gain the ben- efits of prebinding as long as the system libraries used by the applica- tion have been correctly prebound. Updating prebinding for a given library or application can fail if any of its dependent libraries are invalid -- not prebound, expected load address conflicting with other loaded libraries, or missing architecture in a fat library. To test if an application is able to use prebinding information, set the environment variable DYLD_PREBIND_DEBUG. (See dyld(1) for details on this option.) update_prebinding does not actually execute /usr/bin/redo_prebinding when re-prebinding files, but instead contains equivalent code.
SEE ALSO
dyld(1) redo_prebinding(1) BSD February 14, 2001 BSD
Mac OS X 10.3 - Generated Fri Feb 22 15:58:39 CST 2008