Linker - Loader - PDF 8
Linker - Loader - PDF 8
In the execution of the program, major role is played by two utility programs known
as Linker and Loader.
1. Linker
A linker is a special program that combines the object files, generated by the
compiler/assembler and other pieces of code to originate an executable file that
has a .exe extension.
In the object file, the linker searches and append all libraries needed for the
execution of the file.
It regulates the memory space that will hold the code from each module. It also
merges two or more separate object programs and establishes links among
them.
Generally, linkers are of two types:
1. Linkage Editor
2. Dynamic Linker
2. Loader
It is special program that takes input of executable files from linker, loads it to
main memory, and prepares this code for execution by computer.
Loader allocates memory space to program. Even it settles down symbolic
reference between objects.
It is in charge of loading programs and libraries in operating system. The
embedded computer systems don’t have loaders.
In them, code is executed through ROM.
The linker takes input of object code And the loader takes input of
generated by compiler/assembler. executable files generated by linker.
Another use of linker is to combine all object It helps in allocating the address to
modules. executable codes/files.