* [Bug c/98729] GCC 11 MinGW Windows build doesn't generate working PE executables
2021-01-18 14:29 [Bug c/98729] New: GCC 11 MinGW Windows build doesn't generate working PE executables brechtsanders at users dot sourceforge.net
@ 2021-01-18 14:32 ` brechtsanders at users dot sourceforge.net
2021-01-18 16:40 ` [Bug target/98729] " pinskia at gcc dot gnu.org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2021-01-18 14:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98729
--- Comment #1 from Brecht Sanders <brechtsanders at users dot sourceforge.net> ---
I have discovered that adding `-s` to the above build command or stripping the
.exe file with `strip` does allow it to run. So probably something is messed up
in the debugging symbols section.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/98729] GCC 11 MinGW Windows build doesn't generate working PE executables
2021-01-18 14:29 [Bug c/98729] New: GCC 11 MinGW Windows build doesn't generate working PE executables brechtsanders at users dot sourceforge.net
2021-01-18 14:32 ` [Bug c/98729] " brechtsanders at users dot sourceforge.net
@ 2021-01-18 16:40 ` pinskia at gcc dot gnu.org
2021-01-18 17:16 ` brechtsanders at users dot sourceforge.net
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-01-18 16:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98729
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c |target
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
this sounds more like it is a bug in binutils rather than GCC.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/98729] GCC 11 MinGW Windows build doesn't generate working PE executables
2021-01-18 14:29 [Bug c/98729] New: GCC 11 MinGW Windows build doesn't generate working PE executables brechtsanders at users dot sourceforge.net
2021-01-18 14:32 ` [Bug c/98729] " brechtsanders at users dot sourceforge.net
2021-01-18 16:40 ` [Bug target/98729] " pinskia at gcc dot gnu.org
@ 2021-01-18 17:16 ` brechtsanders at users dot sourceforge.net
2021-01-19 7:38 ` [Bug target/98729] [11 Regression] " rguenth at gcc dot gnu.org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2021-01-18 17:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98729
--- Comment #3 from Brecht Sanders <brechtsanders at users dot sourceforge.net> ---
Strange, I'm using the same binutils to build GCC 10.2.0 and have no issues
there.
Configuring the GCC build with `LDFLAGS_FOR_TARGET="-s"` works around this
issue for now, but only for win64. For the win32 build libgfortran fails with
`libgfortran/generated/matmul_c8.c:126: undefined reference to 'LC5'`
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/98729] [11 Regression] GCC 11 MinGW Windows build doesn't generate working PE executables
2021-01-18 14:29 [Bug c/98729] New: GCC 11 MinGW Windows build doesn't generate working PE executables brechtsanders at users dot sourceforge.net
` (2 preceding siblings ...)
2021-01-18 17:16 ` brechtsanders at users dot sourceforge.net
@ 2021-01-19 7:38 ` rguenth at gcc dot gnu.org
2021-01-19 7:41 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-19 7:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98729
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.0
Summary|GCC 11 MinGW Windows build |[11 Regression] GCC 11
|doesn't generate working PE |MinGW Windows build doesn't
|executables |generate working PE
| |executables
Target| |mingw-w64
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Maybe another -gdwarf5 issue? does MingW use DWARF debug?
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/98729] [11 Regression] GCC 11 MinGW Windows build doesn't generate working PE executables
2021-01-18 14:29 [Bug c/98729] New: GCC 11 MinGW Windows build doesn't generate working PE executables brechtsanders at users dot sourceforge.net
` (3 preceding siblings ...)
2021-01-19 7:38 ` [Bug target/98729] [11 Regression] " rguenth at gcc dot gnu.org
@ 2021-01-19 7:41 ` rguenth at gcc dot gnu.org
2021-01-19 19:06 ` brechtsanders at users dot sourceforge.net
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-19 7:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98729
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Yes, the attached file contains DWARF 5 debug info. Try to build the test
file with -gdwarf-4 and see if that makes it work.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/98729] [11 Regression] GCC 11 MinGW Windows build doesn't generate working PE executables
2021-01-18 14:29 [Bug c/98729] New: GCC 11 MinGW Windows build doesn't generate working PE executables brechtsanders at users dot sourceforge.net
` (4 preceding siblings ...)
2021-01-19 7:41 ` rguenth at gcc dot gnu.org
@ 2021-01-19 19:06 ` brechtsanders at users dot sourceforge.net
2021-01-19 19:06 ` brechtsanders at users dot sourceforge.net
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2021-01-19 19:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98729
--- Comment #6 from Brecht Sanders <brechtsanders at users dot sourceforge.net> ---
Created attachment 50004
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50004&action=edit
test built with -gdwarf-4
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/98729] [11 Regression] GCC 11 MinGW Windows build doesn't generate working PE executables
2021-01-18 14:29 [Bug c/98729] New: GCC 11 MinGW Windows build doesn't generate working PE executables brechtsanders at users dot sourceforge.net
` (5 preceding siblings ...)
2021-01-19 19:06 ` brechtsanders at users dot sourceforge.net
@ 2021-01-19 19:06 ` brechtsanders at users dot sourceforge.net
2021-01-20 9:23 ` brechtsanders at users dot sourceforge.net
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2021-01-19 19:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98729
--- Comment #7 from Brecht Sanders <brechtsanders at users dot sourceforge.net> ---
Adding flag `-gdwarf-4` to the above command still results in a file that won't
execute, see attached file `conftest-gdwarf-4.exe`
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/98729] [11 Regression] GCC 11 MinGW Windows build doesn't generate working PE executables
2021-01-18 14:29 [Bug c/98729] New: GCC 11 MinGW Windows build doesn't generate working PE executables brechtsanders at users dot sourceforge.net
` (6 preceding siblings ...)
2021-01-19 19:06 ` brechtsanders at users dot sourceforge.net
@ 2021-01-20 9:23 ` brechtsanders at users dot sourceforge.net
2021-01-20 12:40 ` brechtsanders at users dot sourceforge.net
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2021-01-20 9:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98729
--- Comment #8 from Brecht Sanders <brechtsanders at users dot sourceforge.net> ---
Also, my win64 build uses SEH, not dwarf, so it doesn't look like dwarf is the
issue. I also tried to build with `--enable-compressed-debug-sections=none`,
but that fix the problem either.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/98729] [11 Regression] GCC 11 MinGW Windows build doesn't generate working PE executables
2021-01-18 14:29 [Bug c/98729] New: GCC 11 MinGW Windows build doesn't generate working PE executables brechtsanders at users dot sourceforge.net
` (7 preceding siblings ...)
2021-01-20 9:23 ` brechtsanders at users dot sourceforge.net
@ 2021-01-20 12:40 ` brechtsanders at users dot sourceforge.net
2021-02-01 17:39 ` ebotcazou at gcc dot gnu.org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2021-01-20 12:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98729
--- Comment #9 from Brecht Sanders <brechtsanders at users dot sourceforge.net> ---
The attached .exe will run on Windows after removing the section called `/20`
from the PE file using: `strip conftest.exe --remove-section="/20"`
I don't know what this section does, but I did notice it contains a reference
to `cygwin.S`, which I didn't expect to see in a pure MinGW binary.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/98729] [11 Regression] GCC 11 MinGW Windows build doesn't generate working PE executables
2021-01-18 14:29 [Bug c/98729] New: GCC 11 MinGW Windows build doesn't generate working PE executables brechtsanders at users dot sourceforge.net
` (8 preceding siblings ...)
2021-01-20 12:40 ` brechtsanders at users dot sourceforge.net
@ 2021-02-01 17:39 ` ebotcazou at gcc dot gnu.org
2021-02-02 8:51 ` brechtsanders at users dot sourceforge.net
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2021-02-01 17:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98729
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu.org
Ever confirmed|0 |1
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2021-02-01
--- Comment #10 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> I don't know what this section does, but I did notice it contains a
> reference to `cygwin.S`, which I didn't expect to see in a pure MinGW binary.
The file just implements the stack checking routine mandated by Windows.
Can you post the list of sections given by objdump?
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/98729] [11 Regression] GCC 11 MinGW Windows build doesn't generate working PE executables
2021-01-18 14:29 [Bug c/98729] New: GCC 11 MinGW Windows build doesn't generate working PE executables brechtsanders at users dot sourceforge.net
` (9 preceding siblings ...)
2021-02-01 17:39 ` ebotcazou at gcc dot gnu.org
@ 2021-02-02 8:51 ` brechtsanders at users dot sourceforge.net
2021-02-02 12:05 ` ebotcazou at gcc dot gnu.org
2021-02-09 20:21 ` redi at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2021-02-02 8:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98729
--- Comment #11 from Brecht Sanders <brechtsanders at users dot sourceforge.net> ---
Created attachment 50113
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50113&action=edit
objdump -h
List of sections attached (created using `objdump -h`)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/98729] [11 Regression] GCC 11 MinGW Windows build doesn't generate working PE executables
2021-01-18 14:29 [Bug c/98729] New: GCC 11 MinGW Windows build doesn't generate working PE executables brechtsanders at users dot sourceforge.net
` (10 preceding siblings ...)
2021-02-02 8:51 ` brechtsanders at users dot sourceforge.net
@ 2021-02-02 12:05 ` ebotcazou at gcc dot gnu.org
2021-02-09 20:21 ` redi at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2021-02-02 12:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98729
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #12 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
*** This bug has been marked as a duplicate of bug 98860 ***
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/98729] [11 Regression] GCC 11 MinGW Windows build doesn't generate working PE executables
2021-01-18 14:29 [Bug c/98729] New: GCC 11 MinGW Windows build doesn't generate working PE executables brechtsanders at users dot sourceforge.net
` (11 preceding siblings ...)
2021-02-02 12:05 ` ebotcazou at gcc dot gnu.org
@ 2021-02-09 20:21 ` redi at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: redi at gcc dot gnu.org @ 2021-02-09 20:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98729
--- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Brecht Sanders from comment #8)
> Also, my win64 build uses SEH, not dwarf,
DWARF is still used for debug info even if you don't use it for EH.
^ permalink raw reply [flat|nested] 14+ messages in thread