When you use the linker to construct an executable image, it:
Resolves symbolic references between the input object files.
Extracts object modules from libraries to satisfy otherwise unsatisfied symbolic references.
Sorts input sections according to their attributes and names, and merges sections with similar attributes and names into contiguous chunks.
Removes unused sections.
Eliminates duplicate common groups and common code, data, and debug sections.
Organizes object fragments into memory regions according to the grouping and placement information provided.
Assigns addresses to relocatable values.
Generates an executable image.