Link editor (LD)
combining various pieces of code and data into a single file that can be loaded into memory
Linker’s tasks
- Symbol resolution : each global symbol in an object file is bound to a unique definition
- Relocation : the physical memory address for each symbol is determined and where references to those objects are modified either
kind of linker
- static linker(`linkage editor’) - Object modules combine while Compile time
- dynamic linker - Useful with language libraries (no duplicated copies) - done in Load time or Run time
Shared library
- Static libraries disadvantages - Potential for duplicating- ex. libc.a
- automatically occur when executable - also occur by user code dlopen() - routines can be shared by multiple processes ex. libc.so
Compiler Linker Notion