Difference between revisions of "Linking"

From Computer History Wiki
Jump to: navigation, search
(Make a separate page)
m (also 'loader')
 
Line 1: Line 1:
'''Linking''' is joining together multiple [[relocatable binary]] modules to produce an [[object code|executable binary]] object. This involves two logical stages (although often the software doing the linking, the '''linker''', in actual operation merges them together).
+
'''Linking''' is joining together multiple [[relocatable binary]] modules to produce an [[object code|executable binary]] object. This involves two logical stages (although often the software doing the linking, the '''linker''' or '''loader''', in actual operation merges them together).
  
 
In the first, the linker must pick an [[address]] at which to place each binary module, and modify the [[binary]] of each module to function at that address.
 
In the first, the linker must pick an [[address]] at which to place each binary module, and modify the [[binary]] of each module to function at that address.

Latest revision as of 01:34, 26 October 2021

Linking is joining together multiple relocatable binary modules to produce an executable binary object. This involves two logical stages (although often the software doing the linking, the linker or loader, in actual operation merges them together).

In the first, the linker must pick an address at which to place each binary module, and modify the binary of each module to function at that address.

The second stage is one in which references from one module to names in another ('external references') are 'resolved', and the binary in the module which is making the external reference is modified to properly refer to the location in the output module where the reference's target is to be found.