HP-UX Reference (11i v2 07/12) - 1 User Commands A-M (vol 1)
l
ld_ia(1)
Integrity Systems Only
ld_ia(1)
-E Mark all symbols defined by a program for export to shared libraries. In a
+compat
mode link, ld marks only those symbols that are actually referenced by a shared
library seen at link time. In a +std
link, all symbols are exported by default, so -E
is not necessary to make symbols visible. However, it has an additional side effect of
identifying all exported symbols as necessary, so that they will not be removed when
using dead code elimination (+Oprocelim ).
-Fl Force load the archive library. Equivalent to
+forceload .
-Fw This option is ignored and generates a warning.
-Fz This option is accepted and ignored.
-G Strip all unloadable data from the output file. This option is typically used to strip
debug information and is incompatible with the +ild
option.
NOTE: Use of the
-G option might impair or prevent the use of a symbolic debugger
on the resulting program.
-I Instrument the code to collect profile information upon execution. When an instru-
mented program is executed, a profile database file is output (by default, named
flow.data). The profile data gathered during program execution can be used in
conjunction with the -P option. The default instrumenter is the dynamic instru-
menter /opt/langtools/bin/caliper
, but the +instrumenter option can
be used to invoke the static instrumenter
/opt/langtools/bin/sin
instead.
This option should not be used with the
-P, -O, +ild,or+O options.
NOTE: If using
+instrumenter sin
, the recommended method to instrument
your programs is to use your compiler’s
+I option, rather than the ld -I option. If
you invoke the linker directly, you must pass the
-u__sin_core__
,
-u__sin_init , and -lsin options to the linker. If you have both an instru-
mented shared library and an instrumented shared executable that you want to link
with that library, you must include the -h__sin_core__
and
-h__sin_lookup_ibt
options in addition to the -u options. If using the default
or
+instrumenter caliper, no additional linker options are needed.
-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. This option is enable by default.
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.
-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.
HP-UX 11i Version 2: December 2007 Update − 6 − Hewlett-Packard Company 503