HP-UX Reference (11i v3 07/02) - 1 User Commands A-M (vol 1)
l
ld_ia(1)
Integrity Systems Only
ld_ia(1)
-L dir Search for libx.a
, libx.sl, or libx.so, in dir before looking in default loca-
tions. You can specify more than one directory, but each must be preceded by the
-L
option. The -L option is effective only if it precedes the
-l option on the command
line.
-N In 32-bit mode only, cause the data to be placed immediately following the text, and
make the text writable. Files of this type cannot be shared.
-O Turn on linker optimizations. Currently the optimization includes the removal of
dead procedures.
-O is passed to the linker by the compilers when the
+O4 compiler option is selected.
This option is incompatible with the
+ild option.
For more details on linker optimizations use the
+help option or see the HP-UX
Linker and Libraries User’s Guide manual.
-P Examine the profile database file produced by an instrumented program (see the
-I
option) to perform profile based optimizations on the code. This option should not be
used with the +ild 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.
NOTE: Use of the -Pd option might impair or prevent the use of a symbolic debugger
on the resulting program.
-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 link order file instead of generat-
ing it using /usr/ccs/bin/fdp
. This option is incompatible with the +ild
option.
-Q This option is ignored.
-R offset Set (in hexadecimal) the starting address of the text (i.e., code) segment. This option
is useful with kernel and embedded applications. The default address for 64-bit mode
is 0x4000000000000000 and for 32-mode is 0x04000000. If the
-N option is specified,
the default is 0x1000.
-S This option is ignored and generates a warning message.
-T Same as +nommap option.
-V Output a message giving information about the version of ld being used.
-Z This is the default. 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.)
+alloc_hidden_commons
Force storage allocation for hidden "common" symbols in -r output. This is similar to
the -d option, which allocates storage for all "common" symbols. If
+alloc_hidden_commons is specified in combination with the -d option, -d will
take precedence.
+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.
+[no]allowunsats
Control unsatisfied symbol error reporting. +allowunsats does not flag errors if
the resulting output file has unsatisfied symbols. This is the default for relocatable
links and shared library builds. +noallowunsats flags an error if the resulting
output file has unsatisfied symbols. This is the default for program files.
HP-UX 11i Version 3: February 2007 − 6 − Hewlett-Packard Company 523