Contents
Page-10
Prev
Next
Page+10
Index
Finding Relocatable Modules
The linker is given the name of one or more program modules that
should be included. These form the initial module set.
cc driver.c graph1.s -lm
- For each module, the exported symbols
and imported symbols are
collected.
- If there is some imported symbol that is not defined, it is necessary
to find a relocatable module that defines it. This is done by searching
through one or more libraries, which are
collections of relocatable
files. This process typically occurs for system library routines such as
sin or writeln.
- The above processes are repeated until no undefined
symbols remain.
If a symbol cannot be found, an unsatisfied external
reference
error is reported.
- If any external symbol is defined more than once, a multiply
defined external symbol error is reported.