HP-UX Reference (11i v1 05/09) - 1 User Commands A-M (vol 1)
l
ld(1) ld(1)
-N Generate an executable output file with file type
EXEC_MAGIC . This option is incompatible
with
-n and -q. This option causes the data to be placed immediately following the text, and
makes the text writable. Files of this type cannot be shared.
-S Generate an Initial Program Loader (IPL) auxiliary header for the output file, instead of the
default HP-UX auxiliary header.
-T Save the load data and relocation information in temporary files instead of in memory during
linking. This option reduces the virtual memory requirements of the linker. If the
TMPDIR
environment variable is set, the temporary files are created in the specified directory, rather
than in /var/tmp.
+cdp oldpath:newpath
Replace the recorded path for a shared library in the
a.out. In 32-bit mode, ld records the
absolute path names of any shared libraries searched at link time in the
a.out file. When the
program begins execution, the dynamic loader attaches any shared libraries that were searched
at link time. Although you can use the
+b and/or +s linker options to direct the dynamic
loader to directories to search for the shared libraries, the dynamic loader, as a last resort,
searches for the shared libraries in its absolute, recorded path in the
a.out. You can specify
more than one shared library oldpath:newpath, but each must be preceded by the
+cdp option.
+cg pathname
Specify the use of pathname as the code generator for compiling ISOMs to SOMs. See the dis-
cussion of profile based optimization in the HP-UX Linker and Libraries Online User’s Guide for
more information.
+dpv
Display verbose messages regarding procedures which have been removed due to dead procedure
elimination. The symbol name, input object file, and the size (in bytes) of the deleted procedure
are displayed. The total size (in bytes) of the deleted procedures is also displayed.
+eafilename
Exports all the symbols in the file filename.
+gstbuckets size
Request a particular number of buckets per entry using the global symbol table hash mechanism.
The default value is 3. The value can be overridden at runtime by setting the _HP_DLDOPTS
environment variable to the value -symtab_buckets
number. You can set the value using
chatr +gstbuckets size file.
+nosmartbind
Disable SmartBind when binding a shared library. With this option enabled, the linker places all
symbols in the link into a single SmartBind module instead of placing each .o file in its own
module.
+plabel_cache
Enable the plabel caching mechanism. Use this option with the +gst option.
This option is only effective with C++. In C++ applications, the dynamic loader needs to repeti-
tively access PLABEL information (import stub). In order to make this access faster, the
dynamic loader uses the global symbol table structure to also contain PLABEL entries. This
behavior is enabled when the PLABEL_CACHE flag is set in the dl_header structure (enabled
ld +plabel_cache enable a.out or chatr +plabel_cache enable a.out).
PA-RISC 64-Bit Options
-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. Regular expres-
sions are described in regexp(5).
+allowrorelocs
(Kernel virtual environment support only.) Allow generation of dynamic relocations in
read-only sections such as .text and .rodata. Normally the linker emits an error
Section 1−−448 Hewlett-Packard Company − 12 − HP-UX 11i Version 1: September 2005