HP-UX Linker and Libraries User's Guide

3 Linker Tools for Itanium-Based Systems
This chapter describes the linker toolset for Itanium-based system. This toolset provides several tools
to help you find symbols, display and modify object files, and determine link order. These tools
are specific to ELF (executable and linking format) object file type. The following lists Table 5 (page
53).
Table 5 Linker toolset for Itanium-Based systems
DescriptionTool
Displays or modifies the internal attributes of an object file. See “Changing a Program's Attributes
with chatr(1)” (page 53)
chatr
Displays the symbol table of an object file. See “Viewing Symbols in an Object file with nm(1)”
(page 56)
nm
Displays the contents of an ELF object file. See “Viewing the Contents of an Object File with
elfdump(1)” (page 58)
elfdump
Lists dynamic dependencies of executable files and shared libraries. “Viewing Library Dependencies
with ldd(1)” (page 60)
ldd
Lists the dynamic libraries linked into each process, including shared objects explicitly attached
using dlopen/shl_load.See “Listing Dynamic Libraries with pldd(1)” (page 61)
pldd
Prints a stack trace (hex+symbolic) for each lwp in each process and core file. See “Printing a
Stack Trace with pstack(1)” (page 62)Example 2 “Using the nm command”
pstack
Prints sizes of object file elements. See Viewing the Size of Object File Elements with size(1)”
(page 65)
size
Strips symbol and debugging information from an object file, executable, or archive library. See
“Reducing Storage Space with strip(1)” (page 65)
strip
Improves start-up time of programs that use shared libraries. See“Improving Program Start-up with
fastbind(1)” (page 66)
fastbind
Finds ordering relationship for an object library. See “Finding Object Library Ordering Relationships
with lorder(1)” (page 77)
lorder
Traces inter-module procedure calls. See “Tracing Inter-Module Procedure Calls with ltrace(1)”
(page 67)
ltrace
Changing a Program's Attributes with chatr(1)
The chatr command (see chatr(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. The following summarizes the options you can use to change various attributes:
The chatr command supports two different command syntaxes. One is provided for the easy
manipulation of simple files. Use it to modify files that have only a single text segment and data
segment. The second command syntax allows you to specify selected segments to modify.
The following sections list the additional IPF/PA-64 mode options for the chatr command. See
the chatr(1) manpage for more information about formats.
The following summarizes the options you can use to change various attributes:
Table 6 options to change various attributes
Use the optionTo do this
-l libnameIndicate that the specified shared library is subject to run-time path lookup if directory
path lists are provided (see +s and +b).
-sPerform operations silently.
Changing a Program's Attributes with chatr(1) 53