Definition: The process of combining different modules and libraries into a single executable program.
Types:
Static Linking: Combines all dependencies into one file at compile-time.
Dynamic Linking: Links external libraries during runtime.
Loading
Definition: The process of bringing the executable program into memory for execution.
Phases
- Loading the Program: Places the code and data in memory.
- Relocation: Adjusts memory addresses if needed.
- Dynamic Loading: Loads code modules only when needed during execution.
Key Differences:
Linking prepares the executable, resolving code dependencies.
Loading moves the executable into memory and gets it ready to run.