Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > F

fastbind(1)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

fastbind — Prepare an incomplete executable for faster program start-up

SYNOPSIS

fastbind [-nu] incomplete-executable...

DESCRIPTION

fastbind 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 Variables

If 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.

Options

fastbind recognizes the following options:

-n

Remove the fastbind information from the executable, returning it to the same state it was in before fastbind was originally run on it.

-u

Normally, if fastbind detects any unsatisfied symbols while building the fastbind information, it will generate an error message and not modify the executable file. When fastbind is invoked with -u option however, unresolved symbols are allowed.

EXTERNAL INFLUENCES

Environment Variables

The following internationalization variables affect the execution of fastbind:

LANG

Determines the locale category for native language, local customs and coded character set in the absence of LC_ALL and other LC_* environment variables. If LANG is not specified or is set to the empty string, a default of C (see lang(5)) is used instead of LANG.

LC_ALL

Determines the values for all locale categories and has precedence over LANG and other LC_* environment variables.

LC_MESSAGES

Determines the locale that should be used to affect the format and contents of diagnostic messages written to standard error.

LC_NUMERIC

Determines the locale category for numeric formatting.

LC_CTYPE

Determines the locale category for character handling functions.

NLSPATH

Determines the location of message catalogs for the processing of LC_MESSAGES.

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:

TMPDIR

Specifies a directory for temporary files (see tmpnam(3S)).

DIAGNOSTICS

fastbind returns zero when the operation is successful. A non-zero return code indicates that an error occurred.

EXAMPLES

To 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

WARNINGS

32-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.

AUTHOR

fastbind was developed by Hewlett-Packard.

FILES

a.out

output file

/usr/lib/dld.sl

32-bit PA-RISC dynamic loader

/usr/lib/hpux32/dld.so

32-bit Itanium-based dynamic loader

/usr/lib/pa20_64/dld.sl

64-bit PA-RISC dynamic loader

/usr/lib/hpux64/dld.so

64-bit Itanium-based dynamic loader

/usr/lib/nls/$LANG/fastbind.cat

message catalog

/var/tmp/__FB*

temporary files

SEE ALSO

System Tools

ld(1)

invoke the link editor

Miscellaneous

a.out(4)

assembler, compiler, and linker output

dld.sl(5)

PA-RISC dynamic loader

dld.so(5)

Itanium-based dynamic loader

Texts and Tutorials

HP-UX Linker and Libraries User's Guide

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.