Linking in PA-64 Mode with +std..........................................................................................

48

Linking in PA-32 Mode with +compat...................................................................................

48

Changing Mapfiles with -k and +nodefaultmap......................................................................

48

Selecting Verbose Output with +vtype...................................................................................

48

Turning on the linkage table protection with +protect..............................................................

50

Creating read-only text segment in MPAS executable..............................................................

50

Allocating Storage for Uninitialized Data with +nobss.............................................................

50

Initializing Floating Point Environment with +FP .....................................................................

50

Allocating Storage for Hidden Common Symbols with +alloc_hidden_commons.........................

51

Turn Off Linker Warnings with -w.........................................................................................

52

Preserving Compiler Generated Relocation Sections with -emit_relocs........................................

52

3 Linker Tools for Itanium-Based Systems.........................................................

53

Changing a Program's Attributes with chatr(1)............................................................................

53

Viewing Symbols in an Object file with nm(1).............................................................................

56

Viewing the Contents of an Object File with elfdump(1)................................................................

58

Viewing Library Dependencies with ldd(1)..................................................................................

60

Listing Dynamic Libraries with pldd(1)........................................................................................

61

Printing a Stack Trace with pstack(1)..........................................................................................

62

Viewing the Size of Object File Elements with size(1)....................................................................

65

Reducing Storage Space with strip(1).........................................................................................

65

Improving Program Start-up with fastbind(1)................................................................................

66

Finding Object Library Ordering Relationships with lorder(1).........................................................

67

Tracing Inter-Module Procedure Calls with ltrace(1)......................................................................

67

4 Linker Tools for PA-RISC Systems.................................................................

69

Changing a Program's Attributes with chatr(1)............................................................................

69

Using chatr for 32-bit Program Attributes...............................................................................

69

Using chatr for 64-bit Program Attributes...............................................................................

70

Viewing Symbols in an Object file with nm(1).............................................................................

71

Viewing the Contents of an Object File with elfdump(1)................................................................

72

Viewing library dependencies with ldd(1)...................................................................................

74

Viewing the Size of Object File Elements with size(1)....................................................................

75

Reducing Storage Space with strip(1).........................................................................................

76

Improving Program Start-up with fastbind(1)................................................................................

76

Finding Object Library Ordering Relationships with lorder(1).........................................................

77

5 Linker Toolset Differences Between PA-RISC and Itanium-Based Systems............

79

Linker Toolset Compatibility with De Facto Industry Standards.......................................................

79

ELF Object File Format .......................................................................................................

79

PA-RISC Changes in Hardware Compatibility.............................................................................

79

PA-RISC 2.0 Compatibility...................................................................................................

80

PA-RISC Architectures and Their System Models......................................................................

80

Link-time Differences Between SOM (PA32) and ELF (PA64 and Itanium)........................................

80

Run-time Differences Between SOM (PA32) and ELF (PA64 and Itanium)........................................

82

PA64 Mode Linker Options......................................................................................................

82

Linker-Defined Symbols............................................................................................................

82

Dynamic Path Searching for Shared Libraries..............................................................................

83

Symbol Searching in Dependent Libraries..............................................................................

86

System Libraries - Locations and Library Name Extension..............................................................

87

System Library Location.......................................................................................................

87

Shared Library Extension (suffix)...........................................................................................

87

Statically-bound programs (archive-bound programs)..............................................................

88

6 Creating and Using Libraries......................................................................

89

Overview of Shared and Archive Libraries..................................................................................

89

What are Archive Libraries?.....................................................................................................

90

Contents 5