Stack location and growth direction (GCC)

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
CocaCola
Member
Member
Posts: 36
Joined: Fri Sep 07, 2012 9:11 am

Stack location and growth direction (GCC)

Post 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)?
User avatar
dozniak
Member
Member
Posts: 723
Joined: Thu Jul 12, 2012 7:29 am
Location: Tallinn, Estonia

Re: Stack location and growth direction (GCC)

Post by dozniak »

No. It means in some architectures stack may grow upwards.
Learn to read.
Post Reply