The role of the linker The linker resolves symbols to addresses, nothing more Symbols are in the input object files And unresolved symbols are in there, too It uses (or discards) input object files as a whole It then reassembles ELF sections It does so according to the linker script Each ELF section is an atomic item The same-name sections of different input files are merged Originally, this was only .text, .code and .bss Eventually, it can discard any sections not referenced to This is what happens with "--gc-sections" This is usually after "-ffunction-sections" in the compiler Discarding unused sections is useful in the uC world Similar functions live in the same file, like strcpy() and strcmp()