X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/148c364305b6d96766336c3a09f033064765f074..67e712360a64e904d0475ace013ec52092efcfc8:/base/asm-common.h diff --git a/base/asm-common.h b/base/asm-common.h index 5a5063ac..b4d4a909 100644 --- a/base/asm-common.h +++ b/base/asm-common.h @@ -106,6 +106,12 @@ name: # define WANT_PIC 1 #endif +// Don't make the stack executable by default. +#ifndef FORCE_EXECUTABLE_STACK + .pushsection .note.GNU-stack, "", _SECTTY(progbits) + .popsection +#endif + #endif ///-------------------------------------------------------------------------- @@ -1209,11 +1215,6 @@ name: # define SIZE_OBJ(name) #endif -#if __ELF__ && !defined(FORCE_EXECUTABLE_STACK) - .pushsection .note.GNU-stack, "", _SECTTY(progbits) - .popsection -#endif - ///----- That's all, folks -------------------------------------------------- #endif