chiark
/
gitweb
/
~mdw
/
catacomb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
148c364
)
base/asm-common.h: Hoist executable-stack stuff into the ELF block.
author
Mark Wooding
<mdw@distorted.org.uk>
Fri, 28 Apr 2023 13:06:11 +0000
(14:06 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 28 Apr 2023 13:06:11 +0000
(14:06 +0100)
base/asm-common.h
patch
|
blob
|
blame
|
history
diff --git
a/base/asm-common.h
b/base/asm-common.h
index 5a5063aca63f3fcc04a10c63dc40e8a1cf8a3525..b4d4a909035a0b17adf5930ab25be20dca89ea91 100644
(file)
--- a/
base/asm-common.h
+++ b/
base/asm-common.h
@@
-106,6
+106,12
@@
name:
# define WANT_PIC 1
#endif
# 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
///--------------------------------------------------------------------------
#endif
///--------------------------------------------------------------------------
@@
-1209,11
+1215,6
@@
name:
# define SIZE_OBJ(name)
#endif
# define SIZE_OBJ(name)
#endif
-#if __ELF__ && !defined(FORCE_EXECUTABLE_STACK)
- .pushsection .note.GNU-stack, "", _SECTTY(progbits)
- .popsection
-#endif
-
///----- That's all, folks --------------------------------------------------
#endif
///----- That's all, folks --------------------------------------------------
#endif