HP-UX Reference (11i v2 07/12) - 1 User Commands A-M (vol 1)
l
ld_ia(1)
Integrity Systems Only
ld_ia(1)
+O[no]procelim
Enable [disable] the elimination of procedures and data that are not referenced by the
application. The default is +Onoprocelim .
Procedure and data elimination can occur at any optimization level, including level 0.
The elimination occurs on a per section basis; the section is removed only if all
procedures/data in the section are unreferenced. For more details use the
+help
option or see the HP-UX Linker and Libraries User’s Guide manual. This option is
incompatible with the
+ild option.
Note that compilers may pass +Oprocelim to the linker for higher optimization lev-
els; refer to compiler documentation for detail.
+Oreusedir= dir
This option is ignored and generates a warning message.
+Oselectivepercent
n
Instructs the interprocedural optimizer driver to pass the first n percent of the object
files to the high level optimizer for interprocedural optimizations such as inlining.
This option is designed to work at optimization level 4 (
+O4) in the presence of
dynamic profiling.
+Oselectivesize size
This option is accepted and ignored.
+OselectiveO3
This option is accepted and ignored.
+Ostaticprediction
This option is ignored and generates a warning message.
Defaults
Unless otherwise directed, ld names its output file a.out. The -o option overrides this. The default is
to create a dynamically linked program unless you specify the -noshared option. The default state of
-a
is to search shared libraries if available, archive libraries otherwise. The default bind behavior is
deferred.
The default value of the -Z/-z option is -Z.
The +objdebug Compiler Option
The +objdebug compiler option, when used with any of the -g options, causes the debug information to
be left in the object files instead of being placed in output file. This results in shorter link times and
smaller output files.
To debug the load modules compiled with +objdebug option, the HP WDB debugger must have access to
the object files. (Note that for object files built with the -r option, the individual object files must be avail-
able to the debugger.) If you move the object files, use HP WDB’s
objdir command to specify the loca-
tion of these objects.
The
+noobjdebug compiler option causes the debug information to be copied over to the output file.
+objdebug is the compile-time default.
If the linker detects any object files that were compiled with the +objdebug option, it leaves the debug
information in those files. Any object files not compiled with +objdebug have their debug information
copied into the output file.
You can use the +noobjdebug option at link time to continue to place the debug information into the
output file, even if some objects were compiled with +objdebug.
Incremental linking
In the edit-compile-link-debug development cycle, link time is a significant component. The incremental
linker (available through the +ild and +ildrelink options) can reduce the link time by taking advan-
tage of the fact that you can reuse most of the previous version of the program and that the unchanged
object files do not need to be processed. The incremental linker allows you to insert object code into an out-
put file (executable or shared library) that you created earlier, without relinking the unmodified object files.
The time required to relink after the initial incremental link depends on the number of modules you
modify.
512 Hewlett-Packard Company − 15 − HP-UX 11i Version 2: December 2007 Update