Re: [PATCH] Fix PT_GNU_STACK on LTO compiled binaries with debug info (PR lto/82598, take 2)

2017-10-18 Thread Ian Lance Taylor
Jakub Jelinek writes: > 2017-10-18 Jakub Jelinek > > PR lto/82598 > * simple-object.c (handle_lto_debug_sections): Copy over also > .note.GNU-stack section with unchanged name. > * simple-object-elf.c (SHF_EXECINSTR): Define. >

Re: [PATCH] Fix PT_GNU_STACK on LTO compiled binaries with debug info (PR lto/82598, take 2)

2017-10-18 Thread Jakub Jelinek
On Wed, Oct 18, 2017 at 10:17:49AM +0200, Richard Biener wrote: > Works for me but as said, why's the linker even caring about > .note.GNU-stack in objects that do not contain executable code? The linker simply collects the notes from all *.o files. One case is when none of the objects have the

Re: [PATCH] Fix PT_GNU_STACK on LTO compiled binaries with debug info (PR lto/82598, take 2)

2017-10-18 Thread Richard Biener
On Wed, 18 Oct 2017, Jakub Jelinek wrote: > On Wed, Oct 18, 2017 at 09:24:04AM +0200, Jakub Jelinek wrote: > > When creating lto debugobj, we copy over just the debug sections, > > and from the lack of .note.GNU-stack section then on various targets > > the linker implies RWE PT_GNU_STACK segment

[PATCH] Fix PT_GNU_STACK on LTO compiled binaries with debug info (PR lto/82598, take 2)

2017-10-18 Thread Jakub Jelinek
On Wed, Oct 18, 2017 at 09:24:04AM +0200, Jakub Jelinek wrote: > When creating lto debugobj, we copy over just the debug sections, > and from the lack of .note.GNU-stack section then on various targets > the linker implies RWE PT_GNU_STACK segment header. > > Fixed by copying over also the