HP-UX Reference (11i v2 07/12) - 1 User Commands A-M (vol 1)
l
ld_pa(1)
PA-RISC Systems Only
ld_pa(1)
-T In 32-bit mode, save the load data and relocation information in temporary files
instead of in memory during linking. This option reduces the virtual memory require-
ments of the linker. If the TMPDIR environment variable is set, the temporary files
are created in the specified directory, rather than in
/var/tmp.
In 64-bit mode, this option is equivalent to the
+nommap option.
-V Output a message giving information about the version of
ld being used.
-Z Allow run-time dereferencing of null pointers. See the discussions of
-Z and pointers
in cc(1). (This is the complement of the
-z option.)
-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 by
default. Use +[no]concatrpath to change this default behavoir. A double colon
(::) does not have special meaning (i.e., treated as NULL entry).
524 Hewlett-Packard Company − 6 − HP-UX 11i Version 2: December 2007 Update