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)
into the executable file. You can leave debug information in some object files and not
in others.
When archive members are not compiled with
+objdebug (and they contain debug
information, that is, they were compiled with
-g
), the debug information from the
archive members is copied into the
a.out by default. The linker does not copy
debug information from shared libraries into the a.out
, regardless of whether they
are compiled with
+objdebug or +noobjdebug.
Use the
+noobjdebug option when linking to explicitly tell the linker to copy all
debug information to the executable file, even from files compiled with
+objdebug.
+nomergeseg
Disables the shared library segment merging feature. This is the default.
+nommap Disables the mmap feature and uses the normal buffering method to write into the
output file. NOTE: Do not use +nommap
unless in cases like the system has very
low memory and the linker fails because of this.
+objdebugonly
Ignore debug information from non-objdebug objects or archives and proceed in
+objdebug mode. This option can be passed from the C or C++ compiler com-
mand line as -Wl,+objdebugonly
. If you are debugging only files compiled
with the
+objdebug option, +objdebugonly
can improve link time by instruct-
ing the linker to bypass the processing of debug information from files compiled
with
+noobjdebug. With the +objdebugonly
option, the linker suppresses the
call to
pxdb.
+origin shared_library_name -lx
(Use only before the -l option or the name of a shared library.) Cause the linker to
add $ORIGIN before the shared library name in the shared library list. At runtime,
the dynamic loader determine the current directory of the parent module (shared
library or executable) and replaces $ORIGIN for that directory name.
Example:
$
ld -dynamic main.o +origin libx.sl -L /usr/lib/ -lc
While the +origin option is available, the recommended way to specify $ORIGIN
is in the embedded path with the +b option, for example,
$
ld -dynamic main.o -L /usr/lib/ -lc +B $ORIGIN
For more details on $ORIGIN, use the +help option or see the HP-UX Linker and
Libraries User’s Guide.
+pd size Request a particular virtual memory page size that should be used for data. Sizes
of 4K, 16K, 64K, 256K, 1M, 4M, 16M, 64M,
256M, D, and L are supported. A size
of
D allows the kernel to choose what page size should be used. A size of L will
result in using the largest page size available. The actual page size may vary if the
requested size cannot be fulfilled.
+pgm name Used together with the -P option, this option specifies that name should be used as
the look-up name in the profile database file. The default is the basename of the
output file (specified by the -o option.) This option is incompatible with the +ild
option.
+pi size Request a particular virtual memory page size that should be used for instructions.
See the +pd option for additional information.
+s Indicates that at run-time, the shared library loader can use the environment vari-
able SHLIB_PATH and LD_LIBRARY_PATH (64-bit only) to locate shared
libraries needed by the executable output file that were specified with either the -l
or -l: option. The environment variables should be set to a colon-separated list of
directories. If both +s and +b are used, their relative order on the command line
indicates which path list will be searched first (see the +b option).
+std This option is ignored for 32-bit links. Turns on standard mode, which is the
default in 64-bit mode. Options turned on with this option are: -dynamic.
Options turned off or ignored when this option is specified are:
+compat,+noenvvar,-noshared.
HP-UX 11i Version 2: September 2004 9 Hewlett-Packard Company Section 1477