This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Bad code generated with -mabi=ms?
David Given <dg@cowlark.com> writes:
> Ian Lance Taylor wrote:
> [...]
>> The workaround is to not use -mabi=ms when compiling in 32-bit mode. In
>> 32-bit mode the sysv ABI and the ms ABI are almost identical. They are
>> significantly different in 64-bit mode.
>
> We're using 32-bit, luckily, so this is feasible.
The bug doesn't occur in 64-bit mode anyhow, only in 32-bit mode.
Basically the bug is that the original code did not think anybody would
use -mabi=ms in 32-bit mode.
>> In 32-bit mode, I think the sysv and ms ABI are identical unless you use
>> the -mrtd command line option.
>
> Can you point me at any definitive description of the differences
> between the two ABIs? We're doing some reasonably exotic things and I'd
> like to double check that everything will still work.
I don't know of any such document, sorry. I can tell you where the sysv
ABI is defined (http://refspecs.linuxbase.org/elf/abi386-4.pdf,
http://refspecs.linuxbase.org/elf/x86_64-abi-0.95.pdf), but I don't know
where the MS ABI is defined.
Ian