https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87875
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Note, it needs it executable only if the kernel would create an executable stack normally (i.e. check PT_GNU_STACK segment headers or all libraries and executable, or check if the real stack is executable or not). --- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> --- Created attachment 44956 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44956&action=edit Patch candidate @Jakub: What do you think about the suggested patch? May I attempt to mainline it?