O'Reilly logo

Compilers: Principles and Practice by Himanshu B. Dave, Parag H. Dave

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

C.4 Loaders

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required