Originally Posted by
CornedBee
Raymond isn't very precise. The linker absolutely can modify the code generated by the compiler - it has to. What it cannot do (typically) is modify the code in a way that changes anything important, like opcodes or the position of the opcodes (local jumps would get messed up).
However, all it has to do to resolve a generated external function call is replace an address placeholder with an actual address, which is safe and simple.
Huh?
In the traditional compilation model, the compiler generates assembly, then the assembler generates object code, and the linker links that together, replacing external references on the way.
Microsoft's compiler typically skips the assembly step and produces object code directly.
If, and only if, you enable whole-program optimization, the compiler will instead generate some rather high-level representation of the compilation unit, which the linker then takes, combines with that of all other compilation units, optimizes and finally creates code for. But that's the exception, not the rule.