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
Link-time optimisation (LTO)
I recently started exploring link-time optimisation (LTO), which I used to think was just a single boolean choice in the compilation and linking workflow, and perhaps it was like that a while ago… I’ve learned that these days, there are many different dimensions of LTO across compilers and linkers today and more variations are being proposed all the time. In this “living guide”, I aim to cover the LTO-related features I have encountered thus far.
https://convolv.es/guides/lto/

Seonglae Cho