United States-English |
|
|
HP-UX Reference > Ffastbind(1)HP-UX 11i Version 3: February 2007 |
|
NAMEfastbind — Prepare an incomplete executable for faster program start-up DESCRIPTIONfastbind is a tool that can improve the start-up time of programs that use shared libraries (incomplete executables) by storing information about needed shared library symbols in the executable file. fastbind performs analysis on the symbols used to bind an executable and all of it's dependent shared libraries, and stores this information in the executable file. The next time the executable is run, the dynamic loader will notice that this information is available, and it will use this fastbind information to bind the executable instead of the standard search method for binding the symbols. For Itanium-based systems, the dynamic loader is /usr/lib/hpux32/dld.so for 32-bit mode or /usr/lib/hpux64/dld.so for 64-bit mode. For PA-RISC systems, the dynamic loader is /usr/lib/dld.sl for 32-bit mode or /usr/lib/pa20_64/dld.sl for 64-bit mode. Since fastbind writes the fastbind information in the executable file, you must have write permission on the executable file. Also, if the executable file being analyzed is being run as another process, the file will be locked against modifications by the kernel, and fastbind will fail. If the shared libraries that an executable is dependent on are modified after the fastbind information is created, the dynamic loader will silently revert to standard search method for binding the symbols. The fastbind information can be re-created by running fastbind on the executable again. fastbind will automatically erase the old fastbind information and generate the new one. The ld option +fb can be used to instruct the linker to run the fastbind tool on an incomplete executable it has produced. Environment VariablesIf dld determines that the fastbind information is out of date, it will silently revert to standard search method for binding the symbols. If the environment variable _HP_DLDOPTS is set to -fbverbose the dynamic loader will emit a warning message when the fastbind information is out of date. The environment variable _HP_DLDOPTS can be set to -nofastbind to make the dynamic loader ignore the fastbind information and revert to the standard search method for binding the symbols. Optionsfastbind recognizes the following options:
EXTERNAL INFLUENCESEnvironment VariablesThe following internationalization variables affect the execution of fastbind:
If any internationalization variable contains an invalid setting, fastbind behaves as if all internationalization variables are set to C. See environ(5). In addition, the following environment variable affects fastbind:
DIAGNOSTICSfastbind returns zero when the operation is successful. A non-zero return code indicates that an error occurred. EXAMPLESTo run fastbind on the executable file a.out enter: fastbind a.out To later remove the fastbind information from the executable file a.out enter: fastbind -n a.out WARNINGS32-bit PA-RISC fastbind does not work with EXEC_MAGIC executables. fastbind effectively enforces bind restricted and bind immediate. For example, consider an executable linked bind deferred, which calls a function foo() defined in an implicitly loaded library. Before the actual call is made, if it explicitly loads a shared library (using shl_load(3X) with BIND_FIRST) having a definition for foo(), when foo() is finally called, it will be resolved from the explicitly loaded library. But after running fastbind, the symbol foo() will be resolved from the implicitly loaded library. FILES
|
Printable version | ||
|