Once your source code is assembled, the resulting object file is passed to the linker. At this point, the linker may combine several object files into an executable program. The linker:
Combines segments according to the instructions in the object files, rearranging the positions of segments that share the same class or group.
Fills in placeholders for offsets (relocatable addresses).
Writes relocations for segments into the header of .EXE files (but not .COM files).