Index: apply-hack.x86-64.s =================================================================== --- apply-hack.x86-64.s (revision 15417) +++ apply-hack.x86-64.s (working copy) @@ -54,3 +54,8 @@ movq (%r10), %rdi xorq %rax, %rax call *%r11 + +/* Set non-executable stack for Linux ELF target */ +#if defined(__linux__) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits +#endif Index: apply-hack.x86.s =================================================================== --- apply-hack.x86.s (revision 15417) +++ apply-hack.x86.s (working copy) @@ -33,3 +33,9 @@ movl 4(%esp), %eax movl 8(%esp), %esp call *%eax + +/* Set non-executable stack for Linux ELF target */ +#if defined(__linux__) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits +#endif +