3 ms·
Sounds like we'd describe a linker the same way :) A simple linker doesn't need symbols for a link plan, or even a link plan (assuming you just load all input
by bla3 5y ago
Sounds like we'd describe a linker the same way :)
A simple linker doesn't need symbols for a link plan, or even a link plan (assuming you just load all input files and ignore static library indices). It doesn't even need a symbol table, it can do a full scan of all input files every time it needs a symbol during relocation processing. The symbol table is just a performance optimization.
Again, this changes for a real linker with weak symbols, comdats, section gc, etc.
I baselessly claim that a simple linker that doesn't need to read elf can be < 200 lines :) If you want to do elf, I think that becomes difficult.