During which phase of building a binary is activation record defined?

281 Views Asked by At

Is it during a pre-processing or compilation stage, say on gcc? Is it different on other compilers?

1

There are 1 best solutions below

2
On BEST ANSWER

The stack frame is created at runtime by modifying the stack register of the processor (esp for Intel x86).

The compiler only dump specific instructions to reserve space on the stack at each function call. This space is then recovered when the function exits.