HP UX Software Transition Kit (STK) manual Improving Program Start-up with fastbind1

Models: UX Software Transition Kit (STK)

1 228
Download 228 pages 54.84 Kb
Page 66
Image 66

Table 9 Options to control the amount of information stripped

To

Use the option

Strip line number information only; do not strip any symbol table information.

-l

Same as the -xoption. Obsolete.

-r

Strip the unwind information and annotations.

-u

Print the usage message.

-U

Print the version of the strip command to stderr.

-V

Strip the debug information and line number table.

-x

NOTE: The -land -xoptions are synonymous because the symbol table contains only static and external symbols. Either option strips only symbolic debugging information and unloadable data.

If there are any relocation entries in the object file and any symbol table information is to be stripped, strip issues a message and terminates without stripping the specified file unless the -roption is used. If you execute strip on an archive file (see ar(4)), it removes the archive symbol table. The archive symbol table must be restored by executing ar with its s operator (see ar(1)) before the ld command (see ld (1)) can use the archive. The strip command issues appropriate warning messages when this situation occurs.

Improving Program Start-up with fastbind(1)

The fastbind(1) command prepares an incomplete executable for faster program start-up. It 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. The fastbind command performs analysis on the symbols used to bind an executable and all of its dependent shared libraries, and stores this information in the executable file. The next time the executable is run, the dynamic loader (/usr/lib/hpux32/dld.so for 32-bit or /usr/lib/hpux64/dld.so for 64-bit) detects that this information is available, and uses it to bind the executable instead of using the standard search method for binding the symbols. The fastbind command writes the fastbind information in the executable file. Hence, you must have write permission on the executable file. If the executable file being analyzed is being run as another process or the file is locked against modifications by the kernel, the fastbind command fails. If the shared libraries that an executable is dependent on are modified after the fastbind information is created, the dynamic loader silently reverts to standard search method for binding the symbols. The fastbind information can be re-created by running the fastbind command on the executable again. The fastbind command automatically erases the old fastbind information and generates the new one.

To do this

Use the option

Remove the fastbind information from the executable, returning it to the same state it as

-n

was in before you ran fastbind on it.

 

Normally, if fastbind detects any unsatisfied symbols while building the fastbind

-u

information, it generates an error message and does not modify the executable file. However,

 

when you invoke fastbind with the -uoption, fastbind allows unresolved symbols.

 

The PA-32-bit mode fastbind command does not work with EXEC_MAGIC executables. The fastbind command effectively enforces the binding modes 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

66 Linker Tools for Itanium-Based Systems

Page 66
Image 66
HP UX Software Transition Kit (STK) manual Improving Program Start-up with fastbind1