On Mon, Apr 12, 2010 at 00:56, Vaibhav Shrimali <vaibhav.shrimali@xxxxxxxxx> wrote: > I am working on is similar to this one. Most of the logic is in gcc/cfgexpand.c. Look for expand_stack_vars. Stack protection will mainly cause a reordering of the stack variables, which causes stack allocation to run in two phases. Also look for other side effects of flag_stack_protect (the variable controlled by -fstack-protect). Other than the documentation at http://gcc.gnu.org/onlinedocs, you could try http://gcc.gnu.org/wiki/GettingStarted for other pointers to internal documentation (I'm not sure if there are pointers to stack-protector docs). Diego.