update 8.md 9.md
This commit is contained in:
25
notes/8.md
Normal file
25
notes/8.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# 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?
|
||||
|
||||
1. Symbol Resolution
|
||||
2. Reloacation
|
||||
|
||||
## 3 Types of Object
|
||||
|
||||
1. Relocatable Object File (`*.o`)
|
||||
2. Executable File (`a.out`)
|
||||
3. Shared Object File (`*.so`)
|
||||
|
||||
|
||||
## ELF* Executable and Linkable Format
|
||||
|
||||
Reference in New Issue
Block a user