This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug lto/49703] New: -flto makes stack executable by default


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]