Page 1 of 1

Stack location and growth direction (GCC)

Posted: Sun Jun 23, 2013 8:20 am
by CocaCola
GCC's frame layout documentation contains this paragraph:
http://gcc.gnu.org/onlinedocs/gccint/Fr ... ame-Layout
GCC Online Docs wrote:— Macro: STACK_GROWS_DOWNWARD

Define this macro if pushing a word onto the stack moves the stack pointer to a smaller address.
So this means that by default the stack will grow upward?
Meaning that ESP will hold the upper limit of the stack (a value larger than the one of EBP)?

Re: Stack location and growth direction (GCC)

Posted: Sun Jun 23, 2013 8:40 am
by dozniak
No. It means in some architectures stack may grow upwards.