Loader And Linker – Computer Science Notes – For W.B.C.S. Examination.
Linker and Loader are the utility programs that plays a major role in the execution of a program. The Source code of a program passes through compiler, assembler, linker, loader in the respective order, before execution.Continue Reading Loader And Linker – Computer Science Notes – For W.B.C.S. Examination.
On the one hand, where the linker intakes the object codes generated by the assembler and combine them to generate the executable module. On the other hands, the loader loads this executable module to the main memory for execution.
|BASIS FOR COMPARISON||LINKER||LOADER|
|Basic||It generates the executable module of a source program.||It loads the executable module to the main memory.|
|Input||It takes as input, the object code generated by an assembler.||It takes executable module generated by a linker.|
|Function||It combines all the object modules of a source code to generate an executable module.||It allocates the addresses to an executable module in main memory for execution.|
|Type/Approach||Linkage Editor, Dynamic linker.||Absolute loading, Relocatable loading and Dynamic Run-time loading.|
Definition of Linker
The Assembler generates the object code of a source program and hands it over to the linker. The linker takes this object code and generates the executable code for the program, and hand it over to the Loader.
The high-level language, programs have some built-in libraries and header files. The source program may contain some library functions whose definition are stored in the built-in libraries. The linker links these function to the built-in libraries. In case the built-in libraries are not found it informs to the compiler, and the compiler then generates the error.
Sometimes the large programs are divided into the subprograms which are called modules. Now when these modules are compiled and assembled, the object modules of the source program are generated. The linker has the responsibility of combining/linking all the object modules to generate a single executable file of the source program. We have two types of linkers.
Linkage Editor: It is a linker that generates the relocatable, executable module.
Dynamic Linker: It defers/postpones the linkage of some external modules until the load module/executable module is generated. Here, linking is done during load time or run time.
Definition of Loader
As the program that has to be executed currently must reside in the main memory of the computer. It is the responsibility of the loader, a program in an operating system, to load the executable file/module of a program, generated by the linker, to the main memory for execution. It allocates the memory space to the executable module in main memory.
There are three kinds of loading approaches:
- Absolute loading
- Relocatable loading
- Dynamic run-time loading
Our own publications are available at our webstore (click here).
For Guidance of WBCS (Exe.) Etc. Preliminary , Main Exam and Interview, Study Mat, Mock Test, Guided by WBCS Gr A Officers , Online and Classroom, Call 9674493673, or mail us at – email@example.com
Visit our you tube channel WBCSMadeEasy™ You tube Channel
Please subscribe here to get all future updates on this post/page/category/website