Compiler Linker

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2022 Sep 27 9:4
Editor
Edited
Edited
2024 Mar 19 7:47

Link editor (LD)

combining various pieces of code and data into a single file that can be loaded into memory
Linker’s tasks
  1. Symbol resolution : each global symbol in an object file is bound to a unique definition
  1. Relocation : the physical memory address for each symbol is determined and where references to those objects are modified either
kind of linker
  1. static linker(`linkage editor’) - Object modules combine while Compile time
  1. 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
 
 
 
 
 
 
 
 

Recommendations