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).