eld Manual
Table Of Contents
- eld Manual
- Legal Notices
- Contents
- What’s New in This Manual
- Manual Information
- New and Changed Information
- About This Manual
- Notation Conventions
- 1 Introduction to eld
- 2 eld Input and Output
- 3 Binding of References
- Overview
- Presetting Loadfiles
- To Preset or Not to Preset, and Creation of the LIC
- Handling Unresolved References
- Using User Libraries
- Creating Import Libraries
- Ignoring Optional Libraries
- Merging Symbols Found in Input Linkfiles
- Accepting Multiply-Defined Symbols
- Using the -cross_dll_cleanup option
- Specifying Which Symbols to Export, and Creating the Export Digest
- Public Libraries and DLLs
- The Public Library Registry
- 4 Other eld Processing
- Adjusting Loadfiles: The -alf Option
- Additional rules about -alf
- The -set and -change Options
- eld Functionality for 64-Bit
- Checking the C++ Language Dialect
- Renaming Symbols
- Creating Linker-Defined Symbols
- Updating Or Stripping DWARF Symbol Table Information
- Modifying the Data Sections that Contain Stack Unwinding Information
- Creating the MCB
- Processing of Floating Point Versions and Data Models
- Specification of the Main Entry Point
- Specifying Runtime Search Path Information for DLLs
- Merging Source RTDUs
- 5 Summary of Linker Options
- 6 Output Listings and Error Handling
- A TNS/E Native Object Files
- Glossary
- Index

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.










