5.7.2 Data Stacks
The compiler can implement two types of data stack: a compiled stack and a software stack. Both these stacks are for storing stack-based variables which have automatic storage duration, such as auto, parameter, and temporary variables. In some situations, objects otherwise destined for the software stack might be allocated to working registers to improve performance.
Either one or both of these types of stacks may be used by a program. Compiler options, specifiers and how the functions are called will dictate which stacks are used. See Automatic Storage Duration Objects for more information on how the compiler allocates a function’s stack-based objects.
A section, called stack
, reserves the memory used by the
software stack. The compiled stack is stored in sections with a base name of
cstack
.