Ticket #65: non-exec-stack.diff.txt

File non-exec-stack.diff.txt, 779 bytes (added by Jim Ursetto, 15 years ago)

non-exec stack

Line 
1Index: apply-hack.x86-64.s
2===================================================================
3--- apply-hack.x86-64.s (revision 15417)
4+++ apply-hack.x86-64.s (working copy)
5@@ -54,3 +54,8 @@
6        movq (%r10), %rdi
7        xorq %rax, %rax
8        call *%r11
9+
10+/* Set non-executable stack for Linux ELF target */
11+#if defined(__linux__) && defined(__ELF__)
12+       .section .note.GNU-stack,"",%progbits
13+#endif
14Index: apply-hack.x86.s
15===================================================================
16--- apply-hack.x86.s    (revision 15417)
17+++ apply-hack.x86.s    (working copy)
18@@ -33,3 +33,9 @@
19        movl 4(%esp), %eax
20        movl 8(%esp), %esp
21        call *%eax
22+
23+/* Set non-executable stack for Linux ELF target */
24+#if defined(__linux__) && defined(__ELF__)
25+       .section .note.GNU-stack,"",%progbits
26+#endif
27+