From f25455e60cb791e1dd6c3d6d4c0951579b02c15a Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 29 Apr 2016 19:58:08 -0700 Subject: Security: do not require executable stack. Ever since jmp.S was added, the txr executable has been building with a bit in the program header indicating that the stack is to be executable. * jmp.S: Define the .note.GNU-stack section to tell the linker we don't need an executable stack. --- jmp.S | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/jmp.S b/jmp.S index b1449a93..d589a165 100644 --- a/jmp.S +++ b/jmp.S @@ -55,6 +55,12 @@ NAME: ; NAME: ; #endif +#if __arm__ +#define SIGIL() % +#else +#define SIGIL() @ +#endif + #if __i386__ #define JEIP 0 @@ -238,3 +244,9 @@ DEFUN(jmp_restore) #else #error port me! #endif + +#ifndef __APPLE__ +/* This is needed so our assembly code doesn't cause + the program to require an executable stack! */ +.section .note.GNU-stack,"",SIGIL()progbits +#endif -- cgit v1.2.3