[Mingw-users] MinGW assembler limitation?

Anoq of the Sun anoq@HardcoreProcessing.com
Thu, 25 Jan 2001 03:40:36 +0100


Problem found - reply from
Mumit Khan <khan@NanoTech.Wisc.EDU>
from the MinGW mailing list...


On Wed, 24 Jan 2001, Anoq of the Sun wrote:

> 
> I'm one of those really happy MinGW users -
> who just can't live without that
> Linux->Windows cross-compiler :)
> 
> I just hit a terrible limitation in it
> though... Actually it's the assembler
> which seems to be unable to handle a
> big resulting .s file:
> 
> /usr/local/cross-tools/lib/gcc-lib/i386-mingw32msvc/2.95.2/
> ../../../../i386-mingw32msvc/bin/as: /tmp/filevwWFG6.o:
> reloc overflow: 0x12989 > 0xffff
> /tmp/filevwWFG6.o: File truncated
> /tmp/ccSD5Knj.s: assembler messages:
> /tmp/ccSD5Knj.s:463847: FATAL: Can't close /tmp/filevwWFG6.o:
> File truncated
> Error: call to system failed: gcc -c [etc.]

It's a known bug in the PE assembler. Microsoft uses only 16
bits for reloc count, and then when it turned out to be too
small (as you find out here), started using another field to 
hold the overflow. It's a mess. I was hoping to look into
this a long time, and even did the research, and then it,
like many other things, didn't have the priority.

If anybody is willing to work on it, I can probably help with
the work.