HP-UX Reference (11i v1 05/09) - 1 User Commands A-M (vol 1)
l
ld(1) ld(1)
verbose
Display verbose messages when binding symbols. This is the default except
when -B nonfatal is specified. In that case,
-B verbose must be expli-
citly specified to get verbose messages.
See the
+help option or the HP-UX Linker and Libraries User’s Guide manual for
more information on the uses of binding modes.
-D offset Set the origin (in hexadecimal) for the data segment.
When used with the +ild option, if you change the offset after the initial incremental
link, the linker performs an initial incremental link automatically.
-E Mark all symbols defined by a program for export to shared libraries. In a 32-bit link
or +compat mode 64-bit link, ld marks only those symbols that are actually refer-
enced by a shared library seen at link time. In a 64-bit
+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 lib Force load all member objects of the archive library lib. If you do not use
-Fl, the
linker only loads the needed archive members from lib. This option is useful for creat-
ing a shared library from an archive library (if the member objects are position-
independent code), or when you need to load archive member that define symbols
needed by shared libraries.
You can specify more than one library on the command line with multiple option-
library pairs; that is, each library you specify must be preceded by the -Fl option.
-G Strip all unloadable data from the output file. This option is typically used to strip
debug information.
-I Instrument the code to collect profile information upon execution. The profile data
gathered during program execution can be used in conjunction with the -P option.
32-bit programs linked with this option should use the startup file
/opt/langtools/lib/icrt0.o
. This option should not be used with the -P,
-A, -O, +ild,or+O options.
-L dir Search for libx.a or libx.sl in dir before looking in default locations. More than
one directory can be specified, but each must be preceded by -L. The -L
option is
effective only if it precedes the
-l option on the command line.
-O Turn on linker optimizations. Currently the optimizations include the elimination of
unnecessary
ADDIL instructions from the code in the executable file (32-bit only),
and 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 refer to the
+help option or the HP-UX
Linker and Libraries User’s Guide manual.
-P Examine the data 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 -A or +ild options.
-Q Ignored for 64-bit links. Generate an executable output file with file type
EXEC_MAGIC or SHARE_MAGIC , depending on whether -N or -n is specified.
This is the default. This option is incompatible with -q.
-R offset Set the origin (in hexadecimal) for the text (i.e., code) segment.
When used with the +ild option, if you change the offset after the initial incremen-
tal link, the linker performs an initial incremental link automatically.
-V Output a message giving information about the version of ld being used.
-Z Allow run-time dereferencing of null pointers. See the discussions of -Z and pointers
in cc(1). (This is the complement of the -z option.)
HP-UX 11i Version 1: September 2005 − 5 − Hewlett-Packard Company Section 1−−441