What is Linker & Loader

How Linker & Loader works


Linker & Loader


Linker: A linker is special program that combines the object files, generated by compiler/assembler, and other pieces of codes to originate an executable file have. exe extension. In the object file, linker searches and append all libraries needed for execution of file. It regulates memory space that code from each module will hold. It also merges two or more separate object programs and establishes link among them. Generally, linkers are of two types :

1. Linkage Editor
2. Dynamic Linker

Loader: The loader is special program that takes input of object code 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 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. Generally, loader has three types of approach :

1. Absolute loading
2. Relocatable loading
3. Dynamic run-time loading

Difference Between Linker and Loader :