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-9
Handling Unresolved References
registry has been found then the default for the -unres_symbols option is error. In
other words, eld only thinks it is unreasonable to have unresolved references if the
public DLL registry has been found.
On the other hand, regardless of what the default would have been, and regardless of
whether the -unres_symbols option actually was specified, the linker imposes -
unres_symbols ignore in the following cases:
•
If the -allow_missing_libs option has been specified and there were any
missing DLLs.
•
If the linker is building a program that has a user library and the linker has not been
able to open the user library.
The linker does not check for unresolved references when the -r option is specified,
and eld reports an error if you specify any of the options described above with -r.
Note that, even if the linker is not presetting, it will still try to resolve references for the
purpose of producing messages about unresolved symbols.
If there are unresolved references to symbols that are not globalized, and this is not
being considered an error, and the linker is presetting, then the linker must decide what
to do with those references. If the reference is to a symbol that is expected to be code,
the linker will look for a symbol named UNRESOLVED_PROCEDURE_CALLED_. The
linker looks for this symbol by first looking for a symbol of this name that is exported by
the loadfile being created, and then looks for the symbol in the usual way through
DLLs. If found, and it is a procedure, then the references to the desired symbol are
resolved to this symbol, and the file can still be preset. The references are still
considered to be unresolved as far as putting out messages about unresolved symbols
is concerned. If presetting is successful in this case, the LIC tells that there were
unresolved references.
If unresolved references to symbols that are not globalized cannot be handled as
described in the previous paragraph then the linker decides that the file cannot be
preset. Therefore, whenever a file is preset, it means that all references to symbols
that are not globalized were resolved to something.
The reason that unresolved references to code get more lenient treatment than
unresolved references to data is that it is possible to handle them in a more predictable
way at runtime. Specifically, the HP NonStop operating system provides an
implementation of UNRESOLVED_PROCEDURE_CALLED_ that generates a SIGILL
signal that can be caught but not deferred.
Whether or not the linker can preset is not affected by whether there are any
unresolved references to globalized symbols.
UNRESOLVED_PROCEDURE_CALLED_ is never used to handle unresolved references
to globalized symbols. UNRESOLVED_PROCEDURE_CALLED_ is also not used to
handle unresolved references to $n_EnterPrivN symbols from gateways.
There is also an option named -set rld_unresolved, with the same three
parameter values as for -unres_symbols, and with error as the default. The linker
places the value specified by this option into the RUNTIME_UNRES_CHECKING bits of










