This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Is GCC V3.4.6 supposed to be SystemV i386 ABI v4 compliant?
- From: Ian Lance Taylor <iant at google dot com>
- To: Curtis Taylor <cjt at us dot ibm dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 16 Jan 2009 07:51:54 -0800
- Subject: Re: Is GCC V3.4.6 supposed to be SystemV i386 ABI v4 compliant?
- References: <1232068508.7655.264.camel@t60.folsom.net>
Curtis Taylor <cjt@us.ibm.com> writes:
> I have a case of g++ generating this instruction:
> add $0xe,%esp
> and creating a non 32bit aligned %esp. This is enabling a SIGSEGV in a
> signal handler that expects the stack to be word aligned.
Presumably there is going to be a pushw around there somewhere. gcc
can create a misaligned stack temporarily but it shouldn't create one
across a function call. If that is the case, you may be able to avoid
the problem by using the -mno-push-args or -maccumulate-outgoing-args
options.
I agree that issuing this instruction violates the i386 ELF ABI, and
if current mainline gcc does it that is a bug which should be fixed.
Ian