A loader is a utility program which reads an executable program file in a particular format from a secondary storage unit, puts proper bit-patterns in the memory at specified place and then initiates execution of that program. It should perform the following:
- Request allocation of memory space.
- Resolve symbolic references between object files. We have already seen this function, called linking, under “Linker”, Section C.1 and is included in the loader if it is a Direct-linking loader.
- Adjust all load address-dependent locations – address constants, pointers, even address operands in instructions – to correspond to the allocated load address. This is called relocation. Most of the modern general-purpose computers use Virtual Memory ...