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-21
Processing of Code and Data Sections
The option -export is accepted as a synonym for -exported_symbol, and -export_not as
a synonym for -hidden_symbol.
Exported symbols are identified in the .dynsym and .dynsym.gblzd sections by the fact
that they are marked STB_GLOBAL and not SHN_UNDEF. If a symbol that was
STB_GLOBAL in its input linkfile is not exported, that fact is indicated by marking it as
STB_LOCAL rather than STB_GLOBAL in the output loadfile.
The linker calculates the export digest based on the names and addresses of exported
symbols in the .dynsym section, and on the GP value for the loadfile, and stores it in
the export_digest field of the .tandem_info section. Globalized symbols are not
included in the calculation of the export digest.
The options described in this section are not allowed if -r is specified.
If you are starting with code that had been a single program before, perhaps built from
archives, and now you are changing it to be split up among several DLLs, you might
find it useful to build the program and DLLs with the -b globalized and -export_all
options, to assure that all symbolic references among the program and DLLs keep
referring to a single copy of each symbol.
Processing of Code and Data Sections
A text section contains procedures. A data section contains data that is allocated at a
certain address in virtual memory when the loadfile is brought into memory, as
opposed to data that is dynamically allocated on the stack or in the heap.
The linker checks that the sizes of all code and data sections are multiples of 16 bytes.
Concatenating Code and Data Sections Found in the Input
Linkfiles
A linkfile may have many text sections, with names beginning either .text or .restext.
When the linker is creating a new linkfile with the -r option, it concatenates text
sections of the same names in its input files to create text sections of those same
names in its output file. When section names are the same in different input linkfiles,
the linker concatenates them in the same order as the linker saw those linkfiles.
However, when the linker creates a loadfile, it combines all the input sections whose
names begin .text into a single output text section named .text, and similarly for
.restext. No guarantee is given as to the order in which different text sections whose
names begin .text are combined into a single text section named .text, and similarly for
.restext.
With regard to data sections, again, the linker usually concatenates data sections of
the same names in its input files into data sections of the same names in its output file,
and the linker does this whether creating a linkfile or a loadfile. Except, when an input
linkfile has a section named .rdata, and it contains no relocation sites, the linker
changes the name of that input section to .rconst, and combines all sections named
.rconst into a section of that name in its output file accordingly.










