bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/5105] New: x86_64-pc-mingw32 native ld.exe randomly failed to re


From: drangon dot mail at gmail dot com
Subject: [Bug ld/5105] New: x86_64-pc-mingw32 native ld.exe randomly failed to read the archive file
Date: 4 Oct 2007 15:46:07 -0000

under x86_64 linux, I built the cross x86_64-pc-mingw32 compiler using the
latest CVS/SVN head of binutils gcc mingw-w64,
and the use the cross compiler to build the native x86_64-pc-mingw32
compiler toolchain.

Then I ran the compiler in native WinXP x64, the compiler toolchain
failed to compile.
And I think this is mostly a bug of ld.exe when reading the archive file.

A very simple "hello world" program t3.c, use gcc.exe and as.exe to
create obj file :
..\target\bin\gcc -S t3.c
..\target\bin\as t3.s -o t3.o

then the following command can generate t3.exe successfully under command line

..\target\bin\ld.exe -static -o t3.exe
..\target\x86_64-pc-mingw32\lib\crt2.o
..\target\x86_64-pc-mingw32\lib\crtbegin.o   -L
..\target\x86_64-pc-mingw32\lib  t3.o t3_pp.o -lmingw32 -lmoldname
-lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32
-lmoldname -lmingwex -lmsvcrt
..\target\x86_64-pc-mingw32\lib\crtend.o

but if I double the "-lmingw32", it failed to generate exe file

..\target\bin\ld.exe -static -o t3.exe
..\target\x86_64-pc-mingw32\lib\crt2.o
..\target\x86_64-pc-mingw32\lib\crtbegin.o   -L
..\target\x86_64-pc-mingw32\lib  t3.o t3_pp.o -lmingw32 -lmingw32
-lmoldname -lmingwex -lmsvcrt
-luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lmoldname -lmingwex -lmsvcrt
 ..\target\x86_64-pc-mingw32\lib\crtend.o
..\target\x86_64-pc-mingw32\lib\libmingw32.a: file not recognized: File format n
ot recognized

If I run the command similar with the first successful example ( mainly change
the "\" to "/" ) in MSYS, run the same command several times,
all the odd times run successfule and all the even times run failed.
the same command!

address@hidden /c/tools/test2
$ /c/tools/target/bin/ld.exe -static -o t3.exe  /c/tools/target/x86_64-pc-mingw
32/lib/crt2.o   /c/tools/target/x86_64-pc-mingw32/lib/crtbegin.o   -L /c/tools/
target/lib.old/gcc/x86_64-pc-mingw32/4.3.0  t3.o t3_pp.o -lmingw32 -lmoldname -
lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lmoldname
 -lmingwex -lmsvcrt  /c/tools/target/x86_64-pc-mingw32/lib/crtend.o 

address@hidden /c/tools/test2
$ /c/tools/target/bin/ld.exe -static -o t3.exe  /c/tools/target/x86_64-pc-mingw
32/lib/crt2.o   /c/tools/target/x86_64-pc-mingw32/lib/crtbegin.o   -L /c/tools/
target/lib.old/gcc/x86_64-pc-mingw32/4.3.0  t3.o t3_pp.o -lmingw32 -lmoldname -
lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lmoldname
 -lmingwex -lmsvcrt  /c/tools/target/x86_64-pc-mingw32/lib/crtend.o 
c:\tools\target\bin\../x86_64-pc-mingw32/lib\libmsvcrt.a: file not recognized:
File format not recognized

-- 
           Summary: x86_64-pc-mingw32 native ld.exe randomly failed to read
                    the archive file
           Product: binutils
           Version: 2.19 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: drangon dot mail at gmail dot com
                CC: bug-binutils at gnu dot org
 GCC build triplet: x86_64-redhat-linux-gnu
  GCC host triplet: x86_64-pc-mingw32
GCC target triplet: x86_64-pc-mingw32


http://sourceware.org/bugzilla/show_bug.cgi?id=5105

------- 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]