Contents    Page-10    Prev    Next    Page+10    Index   

Link Editing Process

The task of the link editor is to convert a set of relocatable files into an absolute file that can be executed. The link editor is called ld in Unix; it is called automatically by compilers in most cases.

Link editing involves several steps:

  1. Determine the relocatable code modules that are needed.

  2. Allocate memory and assign absolute addresses for each module.

  3. Determine absolute addresses of external symbols.

  4. Relocate the code to produce an absolute code file.