3.7. The Linking Process

Assemblers and high-level language compilers do not produce a complete program that is ready to run. Instead, a linker program (sometimes called a linkage editor) is provided as part of the system software. The principal tasks of the linker require that it be able to perform three functions:

  1. Build a table of all external symbol names found in all object files.

  2. Gather values for every symbol, including any references to system-supplied routines and special values.

  3. Adjust certain temporary, relative addresses to their final locations.

Like most assemblers and compilers, a linker may require at least two passes through all the object files.

On the first pass, symbols are gathered into a composite symbol table for the entire ...

Get Itanium® Architecture for Programmers: Understanding 64-Bit Processors and EPIC Principles now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.