<aside> 💡 .text → all code .bss → uninit variable (global / static) .data → initialized variable

</aside>

Linking allows to link two output files and then convert them to binary into an executable containing all of the code and data for all of the functions defined.

Benefits of Linking

What do Linkers Do?

Symbol Resolution

void swap() {…}   /* define symbol swap */
swap();           /* reference symbol swap */
int *xp = &x;     /* define symbol xp, reference x */

Symbol Relocation

Different Types of Object Files