HP-UX Reference (11i v2 03/08) - 1 User Commands A-M (vol 1)
l
ld(1) ld(1)
+noenvvar Instruct the dynamic loader to ignore the dynamic path searching environment
variables, LD_LIBRARY_PATH
, SHLIB_PATH, and $ORIGIN at runtime. By
default, or if you specify the
+std option, the dynamic loader looks at the environ-
ment variables, that is, the environment variables are enabled. If you specify the
+compat option or the +noenvvar option, the option takes effect and the dynamic
loader ignores the variables (the environment variables are disabled). See the
+compat or +std options. You can display the status of this option in an execut-
able or shared library from the ’shared library dynamic path search’ output of the
chatr command. See chatr(1) for more information. Generally, this option is used
for secure programs.
+noobjdebug
Override the +objdebug compiler option, and copy all debug information to the
executable file. When you use the
+objdebug compiler option with any of the -g
options, linker leaves the debug information in the object files instead of copying it
over to the output file. You can use the
+noobjdebug option at link time to force
the linker to copy the debug information over to the output file and negate the effect
of the
+objdebug compiler option. See also +nocopyobjdebug
.
+nosectionmerge
With the -r option, allow procedures to be positioned independently. The default
is to merge all procedures into a single section.
+nosmartbind
This option is ignored.
+nosrcpos In IC64 (32-bit and 64-bit), the compiler option +srcpos is the default. +srcpos
causes the compiler to generate part of the debug information even when the com-
piler option -g is not specified. The default +srcpos option also causes part of the
debug information to be always copied over to the executable file, resulting in larger
executables. +srcpos enables the users to profile programs using tools like
cxperf, caliper, and sin, even in the absence of -g compilation.
The linker option
+nosrcpos can be used to override the default +srcpos com-
piler option, and strip these debug information during link time. +nosrcpos can
also be used with "-g +objdebug" to fully enforce the +objdebug mode (i.e.,
leaving the debug information in the object files).
+objdebugonly
Ignore debug information from non-objdebug objects or archives and proceed in
+objdebug mode. 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.
+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 and set
the DF_ORIGIN flag for the output module. At runtime, the dynamic loader deter-
mines the current directory of the parent module (object module, shared library, or
executable) and replaces $ORIGIN for that directory name. For example,
$
ld -dynamic main.o +origin libx.so -L /usr/lib/hpux32/
-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/hpux32/ -lc +b \$ORIGIN
For more details on $ORIGIN, use the +help option or see the HP-UX Linker and
Libraries User’s Guide manual.
+paddata pagesize
Pads the data segment to a multiple of pagesize with zeros. This can improve page
allocation, thus reduce TLB misses by allowing the kernel to allocate fewer, larger
data pages. Use of this option increases your output file size.
+padtext pagesize
Pads the text segment to a multiple of pagesize with zeros. This can improve page
Section 1−−440 Hewlett-Packard Company − 11 − HP-UX 11i Version 2: August 2003