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

eld Manual—527255-009
3-1
3 Binding of References
This section contains the following topics:
•
Overview -an overview of symbol resolution and code relocation.
•
Presetting Loadfiles - the process of resolving references to DLLs at linktime.
•
To Preset or Not to Preset, and Creation of the LIC - the linker’s rules for
presetting.
•
Handling Unresolved References - what happens if a symbol is not found in any
loadfile in the linker’s search list?
•
Using User Libraries - introduces the libname options.
•
Creating Import Libraries - three types are available.
•
Ignoring Optional Libraries - a command stream toggle is available.
•
Merging Symbols Found in Input Linkfiles - merges the symbol information from
the input files into its output file.
•
Accepting Multiply-Defined Symbols - how to accept multiple definitions for a
symbol?
•
Using the -cross_dll_cleanup option - reduces the total size of a program and the
private DLLs that are used by a process.
•
Specifying Which Symbols to Export, and Creating the Export Digest - to export
global and defined symbols.
•
Public Libraries and DLLs - two types, namely implicit and explicit.
•
The Public Library Registry - lists all public DLLs by name.
•
Finding and Reading The Public DLL Registry (ZREG) File - how the linker finds
the file.
Overview
The primary job of the linker is to bind abstract (symbolic) names to real addresses.
For example, as a programmer you can use the name getfile in one module, while
the linker binds that to “a location 512 bytes from the start of module iosys”. This is
known as symbol resolution.
The other closely related function of
eld is that of relocation. Compilers and
assemblers generally create each file of object code with the program address starting
at zero, an address you are unlikely to be able to use. Furthermore if a program is
created from multiple subprograms, all the subprograms have to be loaded at non-
overlapping addresses. These addressing problems are solved by relocation, the
process of assigning load addresses to the various parts of the program, adjusting the
code and data in the program to reflect the assigned addresses.










