518 B
518 B
Linking
When Calling Functions in Other Files, We Need to Link Them Together. Because Caller do know how to pass data by calling convention, but do know where the callee is located in memory.
Why Linker Needed?
- Modularity
- Efficiency
- Time: Seperate Compiliation
- Space: Libraries
What do Linker do?
- Symbol Resolution
- Reloacation
3 Types of Object
- Relocatable Object File (
*.o) - Executable File (
a.out) - Shared Object File (
*.so)