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)
+nocopyobjdebug
Do not copy objdebug space. Use this option (with
-r object files on the link line) to
suppress the default behavior of copying LINKMAP space to the executable file.
+noobjdebug
Override the +objdebug compiler option, and copy all debug information to the
executable file.
When used with -g, +objdebug leaves debug information in the object files instead
of copying it to the executable file at link time, resulting in shorter link times and
smaller executables. The compile-time default, +noobjdebug , copies the debug
information to the executable file.
When you specify -g when compiling, the compiler places symbolic debugging infor-
mation into the object files. By default, the linker calls
pxdb which compacts this
debug information and copies it to the executable file. When
+objdebug was used
at compile time, the linker leaves the debug information in the object files. To debug
the executable file, the HP WDB debugger must have access to the object files. If you
move the object files, use HP WDB’s
objdir command to tell it where the object files
are. The
+objdebug option reduces link time and the size of the executable file by
avoiding this copying of debug information.
The compile-time default is +noobjdebug . If the linker detects any object files that
were compiled with +objdebug, it leaves the debug information in those files. Any
object files not compiled with +objdebug have their debug information copied 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 command
line as -Wl,+objdebugonly
. If you are debugging only files compiled with the
+objdebug option, +objdebugonly can improve link time by instructing 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.
546 Hewlett-Packard Company 9 HP-UX 11i Version 3: February 2007