HP-UX Reference (11i v2 04/09) - 1 User Commands A-M (vol 1)

l
ld_pa(1) ld_pa(1)
(For PA-RISC Systems)
-PD filename Save link order file generated by
fdp during linking with -P option into user-
specified file. This option is incompatible with the
+ild option.
-PF filename Indicate to the linker to use the specified file for the linker file instead of generating
it using /usr/ccs/bin/fdp
. This option is incompatible with the
+ild option.
+afs func_sym_x=func_sym_y...
Instruct the linker to replace the function symbol with an alternate function symbol
in shared library and executable file links.
The
+afs option supports function symbol aliasing. Often user programs have
functions that exactly match the functionality of optimized library functions with a
different name. These user-defined functions are usually called frequently in the
program. With the +afs option, you can make significant gains in performance by
replacing all references to a user-defined function with references to a tuned library
function during link time, thus optimizing these functions with just a relink.
Both functions must define the same number and type of parameters, and return a
value of the same type. If they do not match, the results are unpredictable, and the
linker does not generate a warning message.
Example:
$
ld ... +afs func_sym1=func_sym2
...
In the example, the linker replaces all references to the function symbol func_sym1
with references to func_sym2. The func_sym2 symbol should be an normal
unaliased symbol. It cannot appear on the left-hand side of "=" on another
+afs
option.
You can specify more than one function symbol alias on the command line with mul-
tiple option-symbol pairs, that is, each symbol pair you specify must be preceded by
the
+afs option.
+allowdups Allows multiple symbol definitions. By default, multiple symbol definitions that
occur between relocatable objects will result in a fatal error condition. This option
suppresses the error condition and allows the first symbol definition to be taken.
+b path_list Specify a colon-separated list of directories (embedded path) to be searched at pro-
gram run-time to locate shared libraries needed by the executable output file that
were specified with either the -l or -l: option. An argument consisting of a sin-
gle colon (:) indicates that ld should build the list using all the directories
specified by the -L option and the LPATH environment variable (see the +s
option).
+compat This option is ignored for 32-bit links. This option turns on compatibility mode in
the linker 64-bit links mimic behavior of 32-bit links).
+copyobjdebug
Copy objdebug space.
+df file Used together with the -P option, this option specifies that file should be used as
the profile database file. The default value is flow.data. See the discussion of
the FLOW_DATA environment variable for more information. This option is incom-
patible with the +ild option.
+e symbol When building a shared library or program, mark the symbol for export to the
dynamic loader. Only symbols explicitly marked are exported. When building a
shared library, calls to symbols that are not exported are resolved internally.
+ee symbol This option is similar to the +e option in that it exports a symbol. However, unlike
the +e option, +ee does not alter the visibility of any other symbol in the file. In a
32-bit link or +compat mode 64-bit link, it has the effect of exporting the specified
symbol without hiding any of the symbols exported by default. In a 64 +std link,
all symbols are exported by default, so +ee is not necessary to make a symbol visi-
ble. However, it has the additional side effect of identifying the symbol as necessary,
so that it will not be removed when using dead code elimination (+Oprocelim).
Of course, +ee still retains its export behavior if an option such as +hideallsym-
bols is also given.
Section 1474 Hewlett-Packard Company 6 HP-UX 11i Version 2: September 2004