https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87875
--- Comment #9 from Martin Liška <marxin at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #7) > Not also sure what happens if the executable and libraries don't need > executable stack and you later dlopen some shared library that needs it > (e.g. uses nested functions). Don't remember if ld.so mprotects the main > stack as well as all others. Uff, looks complicated. I've just attached patch that greps for '[stack]' and reads execute flags..