HP-UX Reference (11i v2 04/09) - 1 User Commands A-M (vol 1)

l
ld_pa(1) ld_pa(1)
(For PA-RISC Systems)
-lx Search a library libx
.a or libx.sl, where x is one or more characters. The
current state of the
-a option determines whether the archive (
.a) or shared (.sl)
version of a library is searched. Because a library is searched when its name is
encountered, the placement of a
-l is significant. By default, 32-bit libraries are
located in /usr/lib and /usr/ccs/lib. 64-bit libraries are located in
/usr/lib/pa20_64
. If the environment variable LPATH is present in the user’s
environment, it should contain a colon-separated list of directories to search. These
directories are searched instead of the default directories, but
-L options can still
be 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 a suffix of
.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.
-noshared This option forces the linker to create a fully archive bound program.
-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
building a shared library ( -b ) or in conjunction with -A or +ild incremental link-
ing 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 or a profiler on the
resulting program. This option is incompatible with -r. (The strip(1) command
also removes this information.) This option is incompatible with
+ild. (The incre-
mental 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. On 32-bit systems, for each module
loaded, the linker indicates which symbol caused that module to be loaded. For 64-
bit systems, the linker indicates this information only for modules loaded from
archive libraries.
-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 incompati-
ble with the -r option. This option is incompatible with the +ild option. The
incremental 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 or profiler.
-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 building a shared library. The most common values for bind are:
HP-UX 11i Version 2: September 2004 3 Hewlett-Packard Company Section 1471