Binding of References
eld Manual—527255-009
3-3
Overview
The way references are fixed up across loadfile boundaries depends on the import
control of the loadfile being built. This controls how the search list is created, both at
link time and at load time, to find the DLLs that are needed to resolve symbols
referenced in the loadfile.
There are three choices for this, set by the following options:
-b localized
(this is the default) means “localized”. The searchlist for the loadfile at link
time and load time is:
•
loadfile itself
•
If the loadfile is a program and has a user library, that user library.
•
a breadth-first transitive closure of re-exported liblist-specified DLLs.
•
DLLs specified in the liblist.
This is the the HP NonStop operating system default and gives you the most control
on how your undefined references are resolved at runtime.
-b globalized
means “globalized”. The searchlist for the loadfile at link time is the
same as that of “localized” except that the transitive closure does not include re-
exported DLLs. At load time the searchlist order is as follows:
•
The program
•
If the program has a user library, that user library.
•
The liblist of the program
•
a breadth-first transitive closure of liblist-specified DLLs
•
Other dynamically-loaded DLLs
The key thing to remember is that a globalized loadfile can have its own definitions
preempted by another loadfile. This is the UNIX default behavior.
-b semi_globalized
or
-b symbolic
means “semi-globalized”. It is basically the
same as -bglobalized except that the loadfile itself is at the head of the searchlist at
load time. That means that its definitions cannot be preempted.
All three possibilities are allowed, whether building a program or a DLL, although for a
program the semi-globalized case means the same thing as globalized.
eld
reports an
error if more than one of these options is specified. If the
-make_implicit_lib
option is given,
eld
reports an error if you specify an import control other than
localized.
The import control is stored in the
EF_TANDEM_IMPORT_CONTROLS
bits of the
e_flags
field of the ELF header of the loadfile being built. This manual explains how
these options affect the linker’s actions, but does not explain all the details of how they
affect what
rld
does.
Do not confuse these uses of
-b
with the other uses of
-b
described earlier in
How
the Linker Finds Its Input Files and Creates the .liblist Section
on page 2-12.
Summary of Contents for eld
Page 4: ......
Page 8: ...Contents eld Manual 527255 009 iv ...
Page 12: ...What s New in This Manual eld Manual 527255 009 viii Changes to the 527255 005 Manual ...
Page 34: ...Introduction to eld eld Manual 527255 009 1 14 Example of Use ...
Page 54: ...eld Input and Output eld Manual 527255 009 2 20 Using Archives ...
Page 98: ...Other eld Processing eld Manual 527255 009 4 20 Merging Source RTDUs ...
Page 242: ...Output Listings and Error Handling eld Manual 527255 009 6 132 Glossary of Errors ...