HP-UX Linker and Libraries User's Guide

4 Linker Tools for PA-RISC Systems
This chapter describes the linker toolset, which provides several tools to help you find symbols,
display and modify object files, and determine link order. Some of these tools are specific to a
particular object file type. Others are available in both 32-bit and 64-bit mode. The following table
lists the linker toolset.
DescriptionModeTool
Displays or modifies the internal attributes of an object file. See “Changing a
Program's Attributes with chatr(1)” (page 69) .
32-bit/64-bitchatr
Displays the symbol table of an object file. See “Viewing Symbols in an Object
file with nm(1)” (page 71) .
32-bit/64-bitnm
Displays the contents of an ELF object file. See “Viewing the Contents of an Object
File with elfdump(1)” (page 72)
64-bitelfdump
Lists dynamic dependencies of executable files and shared libraries. “Viewing
library dependencies with ldd(1)” (page 74).
32-bit/64-bitldd
Prints sizes of object file elements. See “Viewing the Size of Object File Elements
with size(1)” (page 75)
32-bit/64-bitsize
Strips symbol and debugging information from an object file, executable, or
archive library. See “Reducing Storage Space with strip(1)” (page 76)
32-bit/64-bitstrip
Improves startup time of programs that use shared libraries. See. “Improving
Program Start-up with fastbind(1)” (page 76)
32-bit/64-bitfastbind
Finds ordering relationship for an object library. See “Finding Object Library
Ordering Relationships with lorder(1)” (page 77)
32-bit/64-bitlorder
Displays the contents of a SOM object file. See the odump(1).32-bitodump
Changing a Program's Attributes with chatr(1)
The chatr command (seechatr(1)) allows you to change various program attributes that were
determined at link time. When run without any options, chatr displays the attributes of the specified
file.
Using chatr for 32-bit Program Attributes
The following table summarizes the options you can use to change various attributes:
Use the optionTo
-n
32-bit mode only: Set the file's magic number to SHARE_MAGIC.
-q
32-bit mode only: Set the file's magic number to DEMAND_MAGIC.
-M
32-bit mode only: Change the file's magic number from EXEC_MAGIC to
SHMEM_MAGIC.
-N
32-bit mode only: Change the file's magic number from SHMEM_MAGIC to
EXEC_MAGIC.
-B immediate
Use immediate binding for all libraries loaded at program startup.
-B deferred
Use deferred binding for all libraries loaded at program startup.
-B nonfatal
Use nonfatal binding. Must be specified with -B immediate or -B deferred.
-B restricted
Use restricted binding. Must be specified with -B immediate or -B deferred.
Changing a Program's Attributes with chatr(1) 69