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

This chapter describes some of the linker toolset differences between PA-RISC and Itanium-based systems. This chapter discusses the following topics:

“Linker Toolset Compatibility with De Facto Industry Standards” (page 79)

“PA-RISC Changes in Hardware Compatibility” (page 79)

“Link-time Differences Between SOM (PA32) and ELF (PA64 and Itanium)” (page 80)

“Run-time Differences Between SOM (PA32) and ELF (PA64 and Itanium)” (page 82)

“PA64 Mode Linker Options” (page 82)

“Linker-Defined Symbols” (page 82)

“Dynamic Path Searching for Shared Libraries” (page 83)

“System Libraries - Locations and Library Name Extension” (page 87)

Linker Toolset Compatibility with De Facto Industry Standards

The HP-UX linker and dynamic loader provide linking and loading behaviors found widely across the Unix industry (SVR4 (System V Release 4) standards). The following linker behaviors are compliant with de facto industry standard:

ELF object file format and libelf(3E) routines

Dynamic path searching

Library-level versioning

The dl* family of dynamic loading routines

Breadth-first symbol searching

The HP-UX 11i v1.5 release maintains the following compatibility behaviors to make transition from PA-32 to IPF mode easier:

Creation of default run-time path environment variable (RPATH) if no ld +b is seen on the link line, to improve transition from the PA-32 linker.

Theld +compat option for compatibility with PA-32 linking and loading behavior.

ELF Object File Format

Starting with the HP-UX 11.0 release, the linker toolset supports the ELF (executable and linking format) object file format. The linker toolset provides new tools to display and manipulate ELF files. The libelf(3E) library routines provide access to ELF files. The command elfdump(1) displays contents of an ELF file. For more information about the structure of ELF object files, see the HP-UX Software Transition Kit (STK) available at:

http://devrsrc1.external.hp.com/STK/index.html

PA-RISC Changes in Hardware Compatibility

The HP-UX 10.20 release introduced HP 9000 systems based on the PA-RISC 2.0 architecture. Also, beginning with that release, HP compilers by default generate executable code for the PA-RISC architecture of the machine on which you are compiling. In previous releases, the compilers generated PA-RISC 1.0 code on all HP 9000 Series 800 servers and PA-RISC 1.1 code on Series 700 workstations. HP compilers now, by default, generate PA-RISC 1.1 code on 1.1 systems and

2.0code on 2.0 systems. Using the +DAportable compiler option provides compatibility of code between PA-RISC 1.1 and 2.0 systems. Note that the HP-UX 10.10 release is the last supported

Linker Toolset Compatibility with De Facto Industry Standards

79