Role of the linker and loader
How a program file becomes a process image.
Module 2
Session 2.1
Lesson 4 of 4
The Role of the Linker and Loader
Operating System Concepts - Executable Pipeline
1. Source Program (main.c)
The translation pipeline begins with source code written in a high-level language like C or C++.
- Contains human-readable statements and function calls.
- Calls standard library routines (e.g.,
printf(),sqrt()). - Must be converted into binary machine code to execute on hardware.
Source File
main.c
#include <stdio.h>
#include <math.h>
int main() {
double val = sqrt(16.0);
printf("Value: %f\n", val);
return 0;
}
Key Role: Source files are modular code components created by software developers.