Red Hat Bugzilla – Bug 199897
crtfastmath.o uses i686-only .align expansions
Last modified: 2007-11-30 17:11:38 EST
Disclaimer: I have very little experience with the internals of the GNU
toolchain, and this maybe manifests only in qemu; feel free to close NOTABUG.
Version-Release number of selected component (if applicable):
To reproduce: (/sbin/sysctl) crashes with SIGILL on rawhide in qemu.
binutils have recently started using new byte sequences for .align, at least if
the target architecture is i686. For some reason the i686-only sequence appears
83: 0f ae 95 e4 fd ff ff ldmxcsr 0xfffffde4(%ebp)
8a: 66 data16
8b: 0f 1f (bad)
8d: 44 inc %esp
8e: 00 00 add %al,(%eax)
This byte sequence is currently executed only if SSE is supported, so this
might cause crashes only in qemu - this is the first time I've heard about
them, I don't know.
Unfortunately I can't find a reason why the i686-only sequence is used;
AFAICS (when rebuilding gcc on fc5) crtfastmath.c is compiled with
-march=i386 -mtune=generic. Is gas perhaps switching to i686 automatically
after encountering an i686-only instruction?
Should be fixed in gcc-4.1.1-14, which has been rebuilt with a fixed assembler.
Anyway, guess qemu should support the nopl insns, if it pretends to be a '6' or
'f' family CPU.
*** This bug has been marked as a duplicate of 200330 ***