Command Reference Guide

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1/!!!intro.1
________________________________________________________________
___ ___
l
ld(1) ld(1)
used. If a program uses shared libraries, the dynamic loader /usr/lib/dld.sl
for 32-bit or /usr/lib/pa20_64/dld.sl for 64-bit will attempt to load each
library from the same directory in which it was found at link time (see the +s and
+b options).
-l: library Search the library specified. Similar to the -l option except the current state of the
-a option is not important. The library name can be any valid filename. (Note that
previous releases required that the library name contain the prefix lib and end with
asuffixof.a or .sl.)
-m This option produces a load map on the standard output.
-n This option is accepted but ignored by the 64-bit ld. Generate an executable output
file with file type SHARE_MAGIC. This is the default. This option is incompatible
with -N and -q.
-o outfile Produce an output object file named outfile (a.out if -o outfile is not specified).
-q This option is ignored for 64-bit links. Generate an executable output file with file
type DEMAND_MAGIC . This option is incompatible with -n, -N, and -Q.
-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 -A or +ild incremental linking
options.
-s Strip the output file of all symbol table, relocation, and debug support information.
This might impair or prevent the use of a symbolic debugger on the resulting pro-
gram. This option is incompatible with
-r. (The strip(1) command also removes this
information.) This option is incompatible with +ild. (The incremental linking
requires the parts of the output load module which are stripped out with -s option.)
-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. More
than one symbol can be specified, but each must be preceded by -u.
-v Display verbose messages during linking. For each library module that is loaded, the
linker indicates which symbol caused that module to be loaded.
-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. This option is incompatible with the +ild option. (The incre-
mental linking requires the parts of the output load module which are stripped out
with the -x option.
Note: use of -x might affect the use of a debugger.
-y symbol Indicate each file in which symbol appears. More than one symbol can be specified,
but each must be preceded by -y.
-z Arrange for run-time dereferencing of null pointers to produce a
SIGSEGV signal.
(This is the complement of the
-Z option.)
-B bind Select run-time binding behavior of a program using shared libraries or the binding
preference in buildinga shared library. The most common values for bind are:
deferred
Bind addresses on first reference rather than at program start-up time. This is
the default.
immediate
Bind addresses of all symbols immediately upon loading the library. Commonly
followed by -B nonfatal to allow procedure calls that cannot be resolved at
program start-up to be resolved on first reference.
Since -B nonfatal suppresses messages about unresolved symbols, also
specify -B verbose to display those messages.
See the example below.
HP-UX Release 11i: December 2000 − 3 − Section 1−−425
___
___