HP-UX Reference (11i v2 07/12) - 1 User Commands A-M (vol 1)
l
ld_ia(1)
Integrity Systems Only
ld_ia(1)
-emit_relocs
Preserve compiler generated relocation sections in output file
-h symbol Prior to writing the symbol table to the output file, mark this name as "local" so that it
is no longer externally visible. This ensures that this particular entry will not clash
with a definition in another file during future processing by
ld. If used when building
a shared library or program, this option prevents the named symbol from being visible
to the dynamic loader.
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
-h option.
-k filename Specify a mapfile that describes the output file memory map.
Please refer to HP-UX Linker and Libraries User’s Guide guide and the
+node-
faultmap
for more information.
-lx Search a library libx
.a, libx.so, or libx.sl, where x is one or more charac-
ters. The current state of the
-a
option determines whether the archive (.a)or
shared (
.sl or .so) 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/hpux32
. 64-bit
libraries are located in
/usr/lib/hpux64
.
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/hpux32/dld.so
for 32-bit, or /usr/lib/hpux64/dld.so for
64-bit, attempts 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.
-m Produce a load map on the standard output.
-n This option is ignored.
-nbucket bucketsizetype
Specify the bucketsizetype
to optimize the hash table size (number of hash buck-
ets). The valid values for bucketsizetype are:
pow2 Sets the number of hash buckets to the highest power of 2 that is less
than the number of dynamic symbols in the library.
prime Sets the number of hash buckets to the largest prime number that is less
than the number of dynamic symbols in the library.
default Sets the number of hash buckets to the default size. (The default size is
currently half the number of dynamic symbols in the library).
-noshared Force the linker to create a fully archive bound program (also called statically-bound
executable).
Specify /usr/ccs/lib/hpux32/crt0.o or
/usr/ccs/lib/hpux64/crt0.o (or equivalent startup code) on the ld com-
mand line when you use this option.
This option is the complement of
-dynamic.
For dynamically linked executables, the dynamic loader is involved in the process of
loading the executable, regardless of whether it was linked with shared libraries. For
statically linked programs, control does not pass to the dynamic loader.
-noshared_dynamic
Create a dynamically linked program if shared libraries are linked in. If no shared
libraries are linked in, the linker creates a fully archive bound program. This option
is the default in compatibility mode (with the +compat) options. See also the
-dynamic and -noshared options.
500 Hewlett-Packard Company − 3 − HP-UX 11i Version 2: December 2007 Update