This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
-fstack-check on MIPS
- From: Pan ruochen <panruochen at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 2 Jul 2009 10:47:06 +0800
- Subject: -fstack-check on MIPS
Hi All,
I compile with -fstack-check and check the disassembly file.
gcc generates a `sw zero,-4392(sp)' instruction before every function call.
I think -4392(sp) is used as a guard to check if the stack has been overflow
during the function is executed. What I does not understand is there is not
a call to ___chkstk on return of the function call. If I miss the chance to
check the guard word, when the stack check action should be executed? And how
the check action is invoked?
BTW, I wonder how gcc decides the offset is -4392? Can I change the value by
some option?
-------------
Best Regards,
PRC
Jul 2, 2008