This is the last phase of program compilation - linking all modules and creating the executable file for program.
|
Turbo Pascal uses "smart" linker which eleminates code and variables that are never referenced. This reduces code size and memory usage.
|
This procedure calculates offset of each program code block and total code size.
|
This procedure calculates offset in data segment for each block of typed constants and variables and checks total data size.
|
This procedure creates space in heap for exe header and typed constants, creates exe file and positions it to the start of the code.
|