tisdag 1 maj 2018 kl. 12:33:33 CEST skrev Jakub Jelinek: > On Tue, May 01, 2018 at 12:24:44PM +0200, Magnus Granberg wrote: > > Hi > > > > The *_resms64*.S files in libgcc don't have section to remove the > > executable stack marking. Can this be added to Gcc 8.0 Rc? > > > > gcc/ChangeLog: > > > > 2018-05-01 Magnus Granberg <zo...@gentoo.org> > > > > * config/i386/cet.h: Add section to remove executable stack marking. > > This is incorrect, the cet.h header is an installed header that has nothing > to do with whether executable stack is needed or not. > > The right spot is either the libgcc/config/i386/i386-asm.h header, or > the libgcc/config/i386/*ms64*.h headers. > > And I don't see anything release critical on this, these files are only in > libgcc.a and only linked in if somebody uses the ms ABI stuff. I think it > can be fixed in 9.0/8.2+ only. > > > --- a/gcc/config/i386/cet.h 2018-04-20 15:30:13.000000000 +0200 > > +++ b/gcc/config/i386/cet.h 2018-05-01 11:45:53.762906162 +0200 > > @@ -87,6 +87,9 @@ > > > > 4: > > .popsection > > > > # endif /* __CET__ */ > > > > +# ifdef __linux__ > > + .section .note.GNU-stack,"",%progbits > > +# endif > > > > # endif /* __ELF__ */ > > #endif /* __ASSEMBLER__ */ > > Jakub New patch
libgcc/ChangeLog: 2018-05-01 Magnus Granberg <zo...@gentoo.org> * config/i386/resms64.h: Add .note.GNU-stack section * config/i386/resms64f.h: Likewise. * config/i386/resms64fx.h: Likewise. * config/i386/resms64x.h: Likewise. * config/i386/savms64.h: Likewise. * config/i386/savms64f.h: Likewise. ---
--- a/libgcc/config/i386/resms64.h 2018-01-03 11:03:58.000000000 +0100 +++ b/libgcc/config/i386/resms64.h 2018-05-01 12:59:48.942833419 +0200 @@ -57,3 +57,6 @@ MS2SYSV_STUB_END(resms64_17) MS2SYSV_STUB_END(resms64_18) #endif /* __x86_64__ */ +#if defined(__linux__) && defined(__ELF__) +.section .note.GNU-stack,"",%progbits +#endif --- a/libgcc/config/i386/resms64f.h 2018-01-03 11:03:58.000000000 +0100 +++ b/libgcc/config/i386/resms64f.h 2018-05-01 13:00:23.422832853 +0200 @@ -55,3 +55,6 @@ MS2SYSV_STUB_END(resms64f_16) MS2SYSV_STUB_END(resms64f_17) #endif /* __x86_64__ */ +#if defined(__linux__) && defined(__ELF__) +.section .note.GNU-stack,"",%progbits +#endif --- a/libgcc/config/i386/resms64fx.h 2018-02-26 20:46:34.000000000 +0100 +++ b/libgcc/config/i386/resms64fx.h 2018-05-01 13:06:49.682826518 +0200 @@ -62,3 +62,6 @@ MS2SYSV_STUB_END(resms64fx_16) MS2SYSV_STUB_END(resms64fx_17) #endif /* __x86_64__ */ +#if defined(__linux__) && defined(__ELF__) +.section .note.GNU-stack,"",%progbits +#endif --- a/libgcc/config/i386/resms64x.h 2018-02-26 20:46:34.000000000 +0100 +++ b/libgcc/config/i386/resms64x.h 2018-05-01 13:07:21.702825993 +0200 @@ -63,3 +63,6 @@ MS2SYSV_STUB_END(resms64x_17) MS2SYSV_STUB_END(resms64x_18) #endif /* __x86_64__ */ +#if defined(__linux__) && defined(__ELF__) +.section .note.GNU-stack,"",%progbits +#endif --- a/libgcc/config/i386/savms64.h 2018-01-03 11:03:58.000000000 +0100 +++ b/libgcc/config/i386/savms64.h 2018-05-01 13:07:48.952825546 +0200 @@ -57,3 +57,6 @@ MS2SYSV_STUB_END(savms64_17) MS2SYSV_STUB_END(savms64_18) #endif /* __x86_64__ */ +#if defined(__linux__) && defined(__ELF__) +.section .note.GNU-stack,"",%progbits +#endif --- a/libgcc/config/i386/savms64f.h 2018-01-03 11:03:58.000000000 +0100 +++ b/libgcc/config/i386/savms64f.h 2018-05-01 13:08:30.082824871 +0200 @@ -55,3 +55,6 @@ MS2SYSV_STUB_END(savms64f_16) MS2SYSV_STUB_END(savms64f_17) #endif /* __x86_64__ */ +#if defined(__linux__) && defined(__ELF__) +.section .note.GNU-stack,"",%progbits +#endif