HP-UX Reference (11i v3 07/02) - 1 User Commands A-M (vol 1)
l
ld_pa(1)
PA-RISC Systems Only
ld_pa(1)
-Pd Reorder debuggable functions. Ordinarily -P does not reorder functions from
.o
files with debugging information, because reordering renders them non-debuggable.
This option overrides this and reorders the functions. Reordering is based on link
order file produced from flow.data by default. If you specify the
-PF option, the
linker uses the specified link order file, instead of
flow.data, for reordering. This
option is incompatible with
+ild.
-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 func-
tions that exactly match the functionality of optimized library functions with a
different name. These user-defined functions are usually called frequently in the pro-
gram. 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 multi-
ple 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 single colon (:) indicates that ld should build the list
using all the directories specified by the -L option and the LPATH environment vari-
able (see the +s option).
For 32-bit links, if multiple +b options appear on the link line, the FIRST one
specified is recorded. Also, a double colon (::) is interpreted as location in which
libraries are found at link time.
For 64-bit links, the LAST of multiple +b options is recorded in the output file. A
double colon (::) does not have special meaning (i.e., treated as NULL entry).
+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 incompatible
with the +ild option.
HP-UX 11i Version 3: February 2007 − 6 − Hewlett-Packard Company 543