User's Manual
At runtime, the dynamic loader does a PA-64 load for all standard mode dependent shared libraries.
The dynamic loader:
• Does dynamic path searching only for standard-mode shared libraries in the DT_NEEDED
entry of the dynamic table which do not contain a path. For those standard-mode dynamic
libraries that contain paths, dld looks for the library as specified.
• Looks for the shared library as specified in the DT_NEEDED dynamic table entry if it contains
a path.
• Looks at LD_LIBRARY_PATH and SHLIB_PATH environment variables at runtime by default
when doing dynamic path searching for standard-mode shared libraries.
• Does not allow RPATH inheritance from ancestors to children (only allowed from parent to
child).
• Does a breadth-first search for all standard-mode dependent shared libraries.
• Looks at the environment variables first, followed by RPATH, and the default directories by
default when doing dynamic path searching for standard-mode dependent shared libraries.
Linking in PA-64 Mode with +std
Use the +std option to instructs the linker to do a PA-64 link. This is the default mode. For more
information, see “Using the IPF Linker with +compat or +std” (page 46).
Linking in PA-32 Mode with +compat
Use the +compat option to instruct the linker to do a PA-32 link. For more information, see “Using
the IPF Linker with +compat or +std” (page 46).
Changing Mapfiles with -k and +nodefaultmap
The linker automatically maps sections from input object files onto output segments in executable
files. These options to the ld command allow you to change the linker's default mapping.
Use the -k filename option to provide a memory map.
The linker uses the file specified by filename as the output file memory map. The +nodefaultmap
option used with -k option prevents the linker from concatenating the default memory map to the
map provided by filename. If you specify +nodefaultmap, the linker does not append the default
mapfile to your mapfile. If you do not specify +nodefaultmap with -k, the linker appends the
output file to the default mapfile.
NOTE: In most cases, the linker produces a correct executable without the use of the mapfile
option. The mapfile option is an advanced feature of the linker toolset intended for systems
programming use, not application programming use. When using the mapfile option, you can
create executable files that do not execute.
For more information on mapfiles and examples using these options, see “Using Mapfiles” (page
191).
Selecting Verbose Output with +vtype
Use the +vtype option to get verbose output about specified elements of the link operation. The
following values specify the typeTable 3 (page 48):
Table 3 values specify the type
DescriptionParameter
Dump information about each object file loaded.
$ ld main.o +vtype files -L. -lfile1 -lfile2 -lc
Loading main.o:
files
48 Determining How to Link Programs or Libraries (Linker Tasks)