ld(1)

ld(1)

-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 -Zand pointers

 

in cc(1). (This is the complement of the -zoption.)

-Pd

Reorder debuggable functions. Ordinarily -Pdoes not reorder functions from .o

 

®les with debugging information, because reordering renders them non-debuggable.

 

This option overrides this and reorders the functions.

-PDfilename

Save link order ®le generated by fdp during linking with -Poption into user-

 

speci®ed ®le. This option is incompatible with the +ild option.

-PFfilename

Indicate to the linker to use the speci®ed ®le for the linker ®le instead of generating it

 

using /usr/ccs/bin/fdp. This option is incompatible with the +ild option.

-dynamic

This allows the linker to create a program which can use shared libraries. This is the

 

default for 64-bit links unless +compat is used. In 32-bit mode, the linker creates a

 

static executable if there are no shared libraries on the link line.

-noshared

This option forces the linker to create a fully archive bound program.

+b path_list

Specify a colon-separated list of directories (embedded path) to be searched at pro-

 

gram run-time to locate shared libraries needed by the executable output ®le that

 

were speci®ed with either the -lor -l:option. An argument consisting of a single

 

colon (:) indicates that ld should build the list using all the directories speci®ed by

 

the -Loption and the LPATH environment variable (see the +s option).

+compat

This option is ignored for 32-bit links. This option turns on compatibility mode in the

 

linker Ð 64-bit links mimic behavior of 32-bit links).

+copyobjdebug

Copy objdebug space.

+df file

Used together with the -Poption, this option speci®es that ®le should be used as the

 

pro®le database ®le. The default value is flow.data. See the discussion of the

 

FLOW_DATA environment variable for more information. This option is incompatible

 

with the +ild option.

+e symbol

When building a shared library or program, mark the symbol for export to the

 

dynamic loader. Only symbols explicitly marked are exported. When building a

 

shared library, calls to symbols that are not exported are resolved internally.

+ee symbol

This option is similar to the +e option in that it exports a symbol. However, unlike

 

the +e option, +ee does not alter the visibility of any other symbol in the ®le. In a

 

32-bit link or +compat mode 64-bit link, it has the effect of exporting the speci®ed

 

symbol without hiding any of the symbols exported by default. In a 64 +std link, all

 

symbols are exported by default, so +ee is not necessary to make a symbol visible.

 

However, it has the additional side effect of identifying the symbol as necessary, so

 

that it will not be removed when using dead code elimination (+Oprocelim). Of

 

course, +ee still retains its export behavior if an option such as +hideallsymbols

 

is also given.

+fb

Instructs the linker to run the fastbind tool on the executable it has produced. The

 

executable should be linked with shared libraries. For more details refer to fast-

 

bind(1), the +help option, or the HP-UX Linker and Libraries User's Guide manual.

 

This option is incompatible with the +ild option.

+fbu

Pass the -uoption to the fastbind tool. For more details refer to fastbind(1), the

 

+help option, or the HP-UX Linker and Libraries User's Guide manual. This option

 

is incompatible with the +ild option.

+gst

Enable the global symbol table hash mechanism, used to look up values of symbol

 

import/export entries. The +gst and related options provide performance enhance-

 

ments through use of global symbol table which improves searching for exported sym-

 

bols. See dld.sl(5) and the HP-UX Linker and Libraries Online User Guide for more

 

information.

+gstsize size

Request a particular hash array size using the global symbol table hash mechanism. The default value is 1103. The value can be overridden at runtime by setting the

HP-UX Release 11i: December 2000

− 5 −

Section 1427

l