Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX 11i Version 1.5 Release Notes: release id B.11.20for rx9610 and rx4610 hp serversand i2000 hp workstations > Chapter 7 Programming

Linker Toolset

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

The IPF linker toolset provides a set of tools for linking and managing ELF object files. This toolset includes the ar, chatr, elfdump, ld, ldd, lorder, nm, size, and strip utilities.

Linking and Loading Behavior

In HP-UX 11i Version 1.5 (B.11.20) the linker and dynamic loader use a linking and loading model that is consistent with the de facto industry standard. The IPF linker maintains certain 32-bit PA behaviors to make the transition from 32-bit PA to IPF easier. You can enable this compatibility feature by using the +compat linker option. The +compat option forces the linker and loader to mimic some of the 32-bit PA behaviors.

Linking and Loading Compatibility

There is no incompatibility for applications migrating from 64-bit PA to 64-bit IPF. Incompatibility for applications migrating from 32-bit PA to 32-bit on IPF can be grouped as follows:

  • obsoleted options and features

    Beginning with HP-UX 11.00, the linker has issued compatibility warnings when these options or features were used. Obsoleted linker options:

    -A name

    This option produces an object file suitable for incremental loading into an already executing archive program. IPF applications must use shared libraries instead.

    -C n

    This option enables function parameter type checking. Parameter type checking and relocation stubs are not supported in the IPF run time architecture.

    -S

    This option is specific to 32-bit PA SOM object file format. It enables generation of SOM Initial Program header (IPL) instead of HP-UX auxiliary header.

    Obsoleted features:

    Intra-library versioning

    In HP-UX 10.0 and later releases, the 32-bit PA linker supported SVR4 library level versioning in addition to intra-library versioning. The IPF linker does not support intra-library versioning. You must use SVR4 library-level versioning instead.

    Name space conflict

    In 64-bit PA and IPF, the code and data symbol names share the same name space. Applications migrating from 32-bit PA to IPF should rename conflicting symbols.

  • locating dependent shared libraries (or dynamic path searching)

    In 64-bit PA and IPF applications, the dynamic loader locates dependent shared libraries using a model similar to other SVR4 systems. You can enforce the conflicting symbols 32-bit PA dynamic loading behavior by using the +compat linker option.

  • symbol searching

    In 32-bit PA, the dynamic loader searches shared libraries using a depth-first search order. In 64-bit PA and IPF, the dynamic loader searches shared libraries using a breadth-first search order. Breadth-first symbol searching is used on all SVR4 platforms. You can enforce the old 32-bit PA style depth-first symbol searching with the +compat linker option.

Linker Toolset Debugging Behavior

On PA systems the default behavior is +noobjdebug, on HP-UX 11i Version 1.5 (B.11.20), the default debugging behavior is +objdebug. When +objdebug is enabled, debug information is not copied over to the executable file, relocatable object files should not be deleted, and they must be present when debugging the program. This results in a significant improvement in link time.

Linker Toolset Debugging Compatibility

Use the +noobjdebug option to force the old style debug model.

PA-RISC Linker Toolset

The linker toolset supports the building of native IPF applications. PA-RISC applications can be run on IPF (through the Aries code emulator) but not compiled and linked on IPF. The PA-RISC linker toolset files (ar, chatr, ldd, nm, odump, size, strip) are provided in a separate directory (/usr/ccs/pa/usr/ccs/bin) and can be used to support existing PA-RISC applications. To use the PA-RISC linker toolset, set the SDKROOT environment variable to /usr/ccs/pa and specify the regular toolset file in the command line. This method invokes a script that starts up the corresponding PA-RISC linker toolset file. For example, with the k-shell:

$ export SDKROOT=/usr/ccs/pa
$ chatr a.out

To run commands from the IPF linker toolset again, unset SDKROOT. Or, if you are running in a mixed environment and need to run IPF and PA-RISC linker tools on different files, you can set SDKROOT for just one command:

$ SDKROOT=/usr/ccs/pa chatr a.out

Linker Toolset Documentation

For more information, see http://devresource.hp.com and the ld(1) manual page.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2001 Hewlett-Packard Development Company, L.P.