Linkers and Loaders

Linkers and Loaders

1st Edition - October 11, 1999

Write a review

  • Author: John Levine
  • Paperback ISBN: 9781558604964

Purchase options

Purchase options
Sales tax will be calculated at check-out

Institutional Subscription

Free Global Shipping
No minimum order


Whatever your programming language, whatever your platform, you probably tap into linker and loader functions all the time. But do you know how to use them to their greatest possible advantage? Only now, with the publication of Linkers & Loaders, is there an authoritative book devoted entirely to these deep-seated compile-time and run-time processes. The book begins with a detailed and comparative account of linking and loading that illustrates the differences among various compilers and operating systems. On top of this foundation, the author presents clear practical advice to help you create faster, cleaner code. You'll learn to avoid the pitfalls associated with Windows DLLs, take advantage of the space-saving, performance-improving techniques supported by many modern linkers, make the best use of the UNIX ELF library scheme, and much more. If you're serious about programming, you'll devour this unique guide to one of the field's least understood topics. Linkers & Loaders is also an ideal supplementary text for compiler and operating systems courses.

Key Features

*Includes a linker construction project written in Perl, with project files available for download. *Covers dynamic linking in Windows, UNIX, Linux, BeOS, and other operating systems.
*Explains the Java linking model and how it figures in network applets and extensible Java code.
*Helps you write more elegant and effective code, and build applications that compile, load, and run more efficiently.


practicing programmers, computer language designers and developers, and students.

Table of Contents

  • 1 Linking and Loading
    1.1 What do Linkers and Loaders Do?
    1.2 Address Binding: A Histrical Perspective
    1.3 Linking vs. Loading
    1.4 Compiler Drivers
    1.5 Linking: A True Life Example
    2 Architectural Issues
    2.1 Application Binary Interfaces
    2.2 Memory Addresses
    2.3 Address Formation
    2.4 Instruction Formats
    2.5 Procedure Calls and Accessibility
    2.6 Data and Instruction References
    2.7 Paging and Virtual Memory
    2.8 Intel 386 Segmentation
    2.9 Embedded Architectures
    3 Object Files
    3.1 What Goes Into an Object File?
    3.2 The Null Object Format: DOS COM Files
    3.3 Code Sections: UNIX a.out Files
    3.4 Relocation: DOS EXE Files
    3.5 Symbols and Relocation
    3.6 Relocatalble a.out
    3.7 UNIX ELF
    3.8 IBM 360 Object Format
    3.9 Microsoft Portable Executable Format
    3.10 Intel/Microsoft OMF Files
    3.11 Comparison of Object Formats
    4 Storage Allocation
    4.1 Segments and Addresses
    4.2 Simple Storage Layout
    4.3 Multiple-Sgement Types
    4.4 Segment and Page Alignment
    4.5 Common Blocks and Other Special Segments
    4.6 Linker Control Scripts
    4.7 Storage Allocation in Practice
    5 Symbol Management
    5.1 Binding and Name Resolution
    5.2 Symbol Table Formats
    5.3 Name Mangling
    5.4 Weak External and Other Kinds of Symbols
    5.5 Maintaining Debugging Information
    6 Libraries
    6.1 Purpose of Libraries
    6.2 Library Formats
    6.3 Craeting Libraries
    6.4 Searching Libraries
    6.5 Performance Issues
    6.6 Weak External Symbols
    7 Relocation
    7.1 Hardware and Software Relocation
    7.2 Link-Time and Load-Time Relocation
    7.3 Symbol and Segment Relocation
    7.4 Basic Relocation Techniques
    7.5 Relinkable and Relocatable Output Formats
    7.6 Other Relocation Formats
    7.7 Relocaton Special Cases
    8 Loading and Overlays
    8.1 Basic Loading
    8.2 Basic Loading, with Relocation
    8.3 Position-Independent Code
    8.4 Bootstrap Loading
    8.5 Tree-Structured Overlays
    9 Shared Libraries
    9.1 Binding Time
    9.2 Shared Libraries in Practice
    9.3 Address Space Management
    9.4 Structure of Shared Libraries
    9.5 Creating Shared Libraries
    9.6 Limking With Shared Libraries
    9.7 Running With Shared Libraries
    9.8 The malloc Hack and Other Shared-Library Problems
    10 Dynamic Linking and Loading
    10.1 ELF Dynamic Linking
    10.2 Contents of an ELF File
    10.3 Loading a Dynamically Linked Program
    10.4 Lazy Procedure Linking with the PLT
    10.5 Other Peculiarities of Dynamic Linking
    10.6 Dynamic Loading of Run Time
    10.7 Microsoft Dynamic-Link Libraries
    10.8 OSF/1 Pseiudo-Static Shared Libraries
    10.9 Making Shared Libraries Fast
    10.10 Comparison of Dynamic Linking Approaches
    11 - Advanced Techniques
    11.1 Techniques for C++
    11.2 Incremental Linking and Relinking
    11.3 Link-Time Garbage Collection
    11.4 Link-Time Optimization
    11.5 Link-Time Code Generation
    11.6 The Java Linking Model

Product details

  • No. of pages: 256
  • Language: English
  • Copyright: © Morgan Kaufmann 1999
  • Published: October 11, 1999
  • Imprint: Morgan Kaufmann
  • Paperback ISBN: 9781558604964

About the Author

John Levine

John Levine is the author or co-author of many books, including lex & yac (O'Reilly), Programming for Graphics Files in C and C++ (Wiley), and The Internet for Dummies (IDG). He is also publisher emeritus of the Journal of C Language Translation, long-time moderator of the comp.compilers newsgroup, and the creator of one of the first commercial Fortran 77 compilers. He holds a Ph.D. in Computer Science from Yale University.

Affiliations and Expertise

author, Trumansburg, New York, U.S.A.

Ratings and Reviews

Write a review

Latest reviews

(Total rating for all reviews)

  • MarcoCampos Thu Jan 03 2019

    Excellent book on the subject!

    Excellent book on the subject!