https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87875
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- 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.