public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/49703] New: -flto makes stack executable by default
@ 2011-07-11 11:59 marcus at jet dot franken.de
  2011-07-11 12:08 ` [Bug lto/49703] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: marcus at jet dot franken.de @ 2011-07-11 11:59 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49703

           Summary: -flto makes stack executable by default
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: marcus@jet.franken.de


$ cat xx.c
#include <stdio.h>
int main(int argc, char **argv) {
        printf("Hallo\n");
        return 0;
}
$ gcc -O2 -o xx xx.c
$ readelf -a xx|grep STACK
  GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x4
$ gcc -flto -O2 -o xx xx.c
$ readelf -a xx|grep STACK
  GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4



-flto should not create executable stacks.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug lto/49703] -flto makes stack executable by default
  2011-07-11 11:59 [Bug lto/49703] New: -flto makes stack executable by default marcus at jet dot franken.de
@ 2011-07-11 12:08 ` rguenth at gcc dot gnu.org
  2011-07-11 12:12 ` marcus at jet dot franken.de
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-07-11 12:08 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49703

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2011.07.11 12:08:34
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-07-11 12:08:34 UTC ---
Works for me ...

please provide preprocessed source.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug lto/49703] -flto makes stack executable by default
  2011-07-11 11:59 [Bug lto/49703] New: -flto makes stack executable by default marcus at jet dot franken.de
  2011-07-11 12:08 ` [Bug lto/49703] " rguenth at gcc dot gnu.org
@ 2011-07-11 12:12 ` marcus at jet dot franken.de
  2011-07-11 12:14 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: marcus at jet dot franken.de @ 2011-07-11 12:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49703

--- Comment #2 from marcus at jet dot franken.de 2011-07-11 12:11:35 UTC ---
Created attachment 24738
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24738
xx.c

gcc -O2 -flto -o xx xx.c
readelf -a xx|grep GNU_STACK

should NOT show "RWE" but only "RW"


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug lto/49703] -flto makes stack executable by default
  2011-07-11 11:59 [Bug lto/49703] New: -flto makes stack executable by default marcus at jet dot franken.de
  2011-07-11 12:08 ` [Bug lto/49703] " rguenth at gcc dot gnu.org
  2011-07-11 12:12 ` marcus at jet dot franken.de
@ 2011-07-11 12:14 ` rguenth at gcc dot gnu.org
  2011-07-11 12:31 ` rguenth at gcc dot gnu.org
  2011-07-11 18:35 ` [Bug lto/49703] -flto makes stack executable by default with GNU ld linker plugin hjl.tools at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-07-11 12:14 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49703

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |UNCONFIRMED
     Ever Confirmed|1                           |0

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-07-11 12:13:57 UTC ---
Works for me.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug lto/49703] -flto makes stack executable by default
  2011-07-11 11:59 [Bug lto/49703] New: -flto makes stack executable by default marcus at jet dot franken.de
                   ` (2 preceding siblings ...)
  2011-07-11 12:14 ` rguenth at gcc dot gnu.org
@ 2011-07-11 12:31 ` rguenth at gcc dot gnu.org
  2011-07-11 18:35 ` [Bug lto/49703] -flto makes stack executable by default with GNU ld linker plugin hjl.tools at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-07-11 12:31 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49703

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|2011-07-11 12:08:34         |2011.07.11 12:31:19
                 CC|                            |davek at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-07-11 12:31:19 UTC ---
I can reproduce it at least on {x86_64,ppc}-linux with the linker plugin from
> ld --version
GNU ld (GNU Binutils; openSUSE Factory) 2.21.1
and the GCC 4.6.1 release.

It works without -fuse-linker-plugin, so I suspect a GNU ld bug.  It works
with gold.  Dave?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug lto/49703] -flto makes stack executable by default with GNU ld linker plugin
  2011-07-11 11:59 [Bug lto/49703] New: -flto makes stack executable by default marcus at jet dot franken.de
                   ` (3 preceding siblings ...)
  2011-07-11 12:31 ` rguenth at gcc dot gnu.org
@ 2011-07-11 18:35 ` hjl.tools at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2011-07-11 18:35 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49703

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                URL|                            |http://www.sourceware.org/b
                   |                            |ugzilla/show_bug.cgi?id=129
                   |                            |82
         Resolution|                            |INVALID

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2011-07-11 18:35:41 UTC ---
It is a linker bug:

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-07-11 18:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-11 11:59 [Bug lto/49703] New: -flto makes stack executable by default marcus at jet dot franken.de
2011-07-11 12:08 ` [Bug lto/49703] " rguenth at gcc dot gnu.org
2011-07-11 12:12 ` marcus at jet dot franken.de
2011-07-11 12:14 ` rguenth at gcc dot gnu.org
2011-07-11 12:31 ` rguenth at gcc dot gnu.org
2011-07-11 18:35 ` [Bug lto/49703] -flto makes stack executable by default with GNU ld linker plugin hjl.tools at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).