Is GCC V3.4.6 supposed to be SystemV i386 ABI v4 compliant?
Ian Lance Taylor
iant@google.com
Fri Jan 16 15:52:00 GMT 2009
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
More information about the Gcc-help
mailing list