HP-UX Reference (11i v3 07/02) - 1 User Commands A-M (vol 1)
l
ld_ia(1)
Integrity Systems Only
ld_ia(1)
restricted Causes the search for a symbol definition to be restricted to those
symbols that were visible when the library was loaded.
symbolic Used only when building a shared library. This option causes all
references in a shared library to be resolved internally if possible.
Such internally-resolved symbols are still externally visible.
By default (without the -B symbolic option), references are either
resolved to a symbol definition in the same compilation unit or to the
most visible definition. The first load module (a.out or shared library)
that exports that symbol contains the most visible definition. More
than one load module can define and export the same symbol. Refer-
ences to a symbol in a shared library can be resolved to a definition in
another shared library even if that symbol is defined in the shared
library. You can use this option to enforce that all references in the
shared library use their own definitions, if defined in the shared
library.
See the +e and +ee options for more information about using
-B
symbolic
with those options.
verbose Display verbose messages when binding symbols. This is the default
except when -B nonfatal is specified. In that case, -B ver-
bose
must be explicitly specified to get verbose messages.
Use the +help option or see the HP-UX Linker and Libraries User’s Guide manual
for more information on the uses of binding modes.
-C n This option is ignored and generates a warning message.
-D offset Set (in hexadecimal) the starting address of the data segment. This option is useful
with kernel and embedded applications. The default address for 64-bit mode is
0x6000000000000000 and the default address for 32-bit mode is 0x40008000.
-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.
522 Hewlett-Packard Company − 5 − HP-UX 11i Version 3: February 2007