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 outfile Produce an output object file named outfile (
a.out if -o outfile is not specified).
-q This option is ignored.
-r Retain relocation information in the output file for subsequent re-linking. The
ld
command does not report undefined symbols. This option cannot be used when build-
ing a shared library (-b) or in conjunction with the
-s, -x, or the +ild incremental
linking options.
-s Strip the output file of all symbol table, relocation, and debug support information.
(The strip(1) command also removes this information.) This option is incompatible
with the
-r option and the +ild
option.
NOTE: Use of the
-s option might impair or prevent the use of a symbolic debugger
on the resulting program.
-symbolic symbol
When building a shared library, causes the linker to resolve all references to the
specified symbol to the symbol defined in the library. This option is similar to
-B
symbolic
, but operates on a per symbol basis.
You can specify more than one symbol on the command line with multiple option-
symbol pairs, that is, each symbol you specify must be preceded by the -symbolic
option.
symbol can also be a regular expression that matches multiple symbol names. Regu-
lar expressions are described in regexp(5).
-t Print a trace (to standard output) of each input file as
ld processes it.
-u symbol Enter symbol as an undefined symbol in the symbol table. The resulting unresolved
reference is useful for linking a program solely from object files in a library.
You can specify more than one symbol on the command line with multiple option-
symbol pairs, that is, each symbol you specify must be preceded by the -u option.
-v Display verbose messages during linking. This option is equivalent to +vtype all
(see the +vtype option for more information).
-w Suppress all warnings.
-x Strip local symbols from the output file. This reduces the size of the output file
without impairing the effectiveness of object file utilities. This option is incompatible
with the -r option and the +ild options. (The incremental linker requires the parts
of the output load module which are stripped out with the -x option.)
NOTE: Use of the -x option might impair or prevent the use of a symbolic debugger
on the resulting program.
-y symbol Indicate each file in which symbol appears. You can specify more than one symbol on
the command line with multiple option-symbol pairs, that is, each symbol you specify
must be preceded by the
-y option.
-z Arrange for run-time dereferencing of null pointers to produce a SIGSEGV signal.
(This is the complement of the -Z option. -Z is the default.)
-A name This option is ignored and generates a warning message.
-B bind Select run-time binding behavior of a program using shared libraries or the binding
preference in building a shared library. The most common values for bind are:
direct Create direct link between symbol references and shared libraries by
recording the name of the resolved shared library during symbol reso-
lution. This information is used during runtime to quickly resolve
symbols without searching through all currently loaded libraries.
-B direct will implicitly turn on symbolic binding (see -B sym-
bolic
) and disable dependent shared library processing.
Direct binding can be disable during runtime by setting the
LD_NODIRECTBIND environment variable.
HP-UX 11i Version 2: December 2007 Update − 4 − Hewlett-Packard Company 501