![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference Between Linker and Loader
In this post, we will understand the difference between a linker and a loader −
Linker
The main function of the linker is to generate executable files.
The linker takes the input as the object code which would be generated by a compiler/assembler.
The process of linking can be understood as a method to combine different snippets of code in order to obtain executable code.
There are two types of linkers available: Linkage Editor and Dynamic Linker.
Linker also helps combine all the object modules.
Linker is responsible to arrange the objects in the program’s address space.
Loader
The main function of a loader is to load executable files to the main memory.
It takes the executable files (generated by linker) as its input.
It can be understood as a process of loading the executable codes into main memory where it is execute further.
There are 3 types of loaders: Absolute loading, Relocatable loading and Dynamic run-time loading.
It helps allocate the addresses to executable codes or files.
It is also responsible to adjust the references that are used within the program.