What are loaders and discuss various loading schemes with implementation of an absolute loader?
The loader is a program which accepts an object code and prepare
them for execution.The loader's target language is machine
language, its source language is nearly machine langugae.loading is
ultimately bound with storage management function of operating
systems and is usually performed later than assembly or
compilation.the period of executions of user program is called
execution time.the period of translating user's source program is
called assembly or compile time. load time refers to the period of
loading and preparing object program for execution.
Loading schemes: 1.Absolute loader. 2.Relocating loader.
3.Direct linking loader. 4.Dynamic Loading. 5.Dynamic linking.
Absolute loader: The task of an absolute loader is virtually
trivial.The loader simply accepts machine language code and places
it into main memory specified by the assembler.
Relocating loader: The task of relocating loader is to avoid
reassembling of of all subroutines when a subroutine is changed and
to perform tasks of allocation and linking for programmer.
Dynamic loading: In order to overlay structure to work it is
necessary for the module loader to load the various procedures as
they are needed.There are many binders capable of processing and
allocating overlay structure.the portion of the laoder that
actually intercepts calls and loads necessary procedure is called
overlay supervisor of simplly flipper.this overall scheme is called
dynamic loading or load on call.
Dynamic linking: This is mechanism by which loading and linking
of external references are postponed until execution time.This was
made to sort out disadvantage of previous loading schemes like
subroutine is referenced and never executed
Implementation of Absolute loader: The four loader functions are
performed as following: 1.Allocation- By programmer 2.Linking- By
programmer 3.Relocation- By assembler 4.Loading- By loader