| |
| |
Preface | |
| |
| |
| |
Linking and Loading | |
| |
| |
| |
What Do Linkers and Loaders Do? | |
| |
| |
| |
Address Binding: A Historical Perspective | |
| |
| |
| |
Linking vs. Loading | |
| |
| |
| |
Compiler Drivers | |
| |
| |
| |
Linking: A True-Life Example | |
| |
| |
Exercises | |
| |
| |
| |
Architectural Issues | |
| |
| |
| |
Application Binary Interfaces | |
| |
| |
| |
Memory Addresses | |
| |
| |
| |
Address Formation | |
| |
| |
| |
Instruction Formats | |
| |
| |
| |
Procedure Calls and Addressability | |
| |
| |
| |
Data and Instruction References | |
| |
| |
| |
Paging and Virtual Memory | |
| |
| |
| |
Intel 386 Segmentation | |
| |
| |
| |
Embedded Architectures | |
| |
| |
Exercises | |
| |
| |
| |
Object Files | |
| |
| |
| |
What Goes into an Object File? | |
| |
| |
| |
The Null Object Format: DOS COM Files | |
| |
| |
| |
Code Sections: UNIX a.out Files | |
| |
| |
| |
Relocation: DOS EXE Files | |
| |
| |
| |
Symbols and Relocation | |
| |
| |
| |
Relocatable a.out | |
| |
| |
| |
UNIX ELF | |
| |
| |
| |
IBM 360 Object Format | |
| |
| |
| |
Microsoft Portable Executable Format | |
| |
| |
| |
Intel/Microsoft OMF Files | |
| |
| |
| |
Comparison of Object Formats | |
| |
| |
Exercises | |
| |
| |
Project | |
| |
| |
| |
Storage Allocation | |
| |
| |
| |
Segments and Addresses | |
| |
| |
| |
Simple Storage Layout | |
| |
| |
| |
Multiple-Segment Types | |
| |
| |
| |
Segment and Page Alignment | |
| |
| |
| |
Common Blocks and Other Special Segments | |
| |
| |
| |
Linker Control Scripts | |
| |
| |
| |
Storage Allocation in Practice | |
| |
| |
Exercises | |
| |
| |
Project | |
| |
| |
| |
Symbol Management | |
| |
| |
| |
Binding and Name Resolution | |
| |
| |
| |
Symbol Table Formats | |
| |
| |
| |
Name Mangling | |
| |
| |
| |
Weak External and Other Kinds of Symbols | |
| |
| |
| |
Maintaining Debugging Information | |
| |
| |
Exercises | |
| |
| |
Project | |
| |
| |
| |
Libraries | |
| |
| |
| |
Purpose of Libraries | |
| |
| |
| |
Library Formats | |
| |
| |
| |
Creating Libraries | |
| |
| |
| |
Searching Libraries | |
| |
| |
| |
Performance Issues | |
| |
| |
| |
Weak External Symbols | |
| |
| |
Exercises | |
| |
| |
Project | |
| |
| |
| |
Relocation | |
| |
| |
| |
Hardware and Software Relocation | |
| |
| |
| |
Link-Time and Load-Time Relocation | |
| |
| |
| |
Symbol and Segment Relocation | |
| |
| |
| |
Basic Relocation Techniques | |
| |
| |
| |
Relinkable and Relocatable Output Formats | |
| |
| |
| |
Other Relocation Formats | |
| |
| |
| |
Relocation Special Cases | |
| |
| |
Exercises | |
| |
| |
Project | |
| |
| |
| |
Loading and Overlays | |
| |
| |
| |
Basic Loading | |
| |
| |
| |
Basic Loading, with Relocation | |
| |
| |
| |
Position-Independent Code | |
| |
| |
| |
Bootstrap Loading | |
| |
| |
| |
Tree-Structured Overlays | |
| |
| |
Exercises | |
| |
| |
Project | |
| |
| |
| |
Shared Libraries | |
| |
| |
| |
Binding Time | |
| |
| |
| |
Shared Libraries in Practice | |
| |
| |
| |
Address Space Management | |
| |
| |
| |
Structure of Shared Libraries | |
| |
| |
| |
Creating Shared Libraries | |
| |
| |
| |
Linking with Shared Libraries | |
| |
| |
| |
Running with Shared Libraries | |
| |
| |
| |
The malloc Hack and Other Shared-Library Problems | |
| |
| |
Exercises | |
| |
| |
Project | |
| |
| |
| |
Dynamic Linking and Loading | |
| |
| |
| |
ELF Dynamic Linking | |
| |
| |
| |
Contents of an ELF File | |
| |
| |
| |
Loading a Dynamically Linked Program | |
| |
| |
| |
Lazy Procedure Linkage with the PLT | |
| |
| |
| |
Other Peculiarities of Dynamic Linking | |
| |
| |
| |
Dynamic Loading at Run Time | |
| |
| |
| |
Microsoft Dynamic-Link Libraries | |
| |
| |
| |
OSF/1 Pseudo-Static Shared Libraries | |
| |
| |
| |
Making Shared Libraries Fast | |
| |
| |
| |
Comparison of Dynamic Linking Approaches | |
| |
| |
Exercises | |
| |
| |
Project | |
| |
| |
| |
Advanced Techniques | |
| |
| |
| |
Techniques for C++ | |
| |
| |
| |
Incremental Linking and Relinking | |
| |
| |
| |
Link-Time Garbage Collection | |
| |
| |
| |
Link-Time Optimization | |
| |
| |
| |
Link-Time Code Generation | |
| |
| |
| |
The Java Linking Model | |
| |
| |
Exercises | |
| |
| |
Project | |
| |
| |
References | |
| |
| |
Index | |