bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/1046] New: Creates invalid Win32 applications (.exe) with gcc4


From: ovidr at users dot sourceforge dot net
Subject: [Bug ld/1046] New: Creates invalid Win32 applications (.exe) with gcc4
Date: 3 Jul 2005 20:54:07 -0000

Tried with:
GCC with gcj, precompiled with binutils 2.15.94:
http://www.thisiscool.com/gcc_mingw.htm
http://www.thisiscool.net/gcc40-20050324.tar.bz2

Also tried with a self compiled gcc 4.0 and with binutils head (july 1st 2005).

Most applications I compile and link produce working executables. This is true 
at -O0 and -O1 with gcc.

Specific larger applications compile and link, but when compiled -O1 and above, 
the resulting .exe is reported to not be a valid win32 application. Win32 
reports:

app.exe is not a valid Win32 application.

Looking in the .exe (view it in hex), the .rdata section has more than /1500 
entries. I don't know what they are, but when the number exceeds approx /1500, 
the apps are no longer valid.  (just an observation)

Attached is a simple big.java file.  Compiles and links fine.  The 
resulting .exe works fine at -O0, but not -O1 and above on win32.  The 
resulting binary works fine on linux at any optimization level.

gcj -O1 --main=big big.java -o big
big.exe is not a valid Win32 Application

It is just a bunch of strings of increasing length. This seems to fill
up the .rdata section. With less than 150 strings the .exe works.  At -O0 it
works. More than 175 strings and -O1 or above and the .exe becomes invalid.

I don't know what else to try, but it seems to be a binutils (as or ld) bug 
(gcc bugmaster suggests the same).

-- 
           Summary: Creates invalid Win32 applications (.exe) with gcc4
           Product: binutils
           Version: 2.17 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: ovidr at users dot sourceforge dot net
                CC: bug-binutils at gnu dot org
  GCC host triplet: win32


http://sources.redhat.com/bugzilla/show_bug.cgi?id=1046

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]