What is the difference between Compile time, Load time and Execution time?
- Can someone explain me these three terms in a very simple language?
- It would be easier to understand if you can provide some examples as well.
Context:
Classically, the binding of instructions and data to memory addresses can be done at any step along the way:
Compile time. The compiler translates symbolic addresses to absolute addresses. If you know at compile time where the process will reside in memory, then absolute code can be generated (Static).
Load time. The compiler translates symbolic addresses to relative (relocatable) addresses. The loader translates these to absolute addresses. If it is not known at compile time where the process will reside in memory, then the compiler must generate relocatable code (Static).
Execution time. If the process can be moved during its execution from one memory segment to another, then binding must be delayed until run time. The absolute addresses are generated by hardware. Most general-purpose OSs use this method (Dynamic).