Permalink
Browse files

Bugfix: allow no-exec (NX) stack

  • Loading branch information...
1 parent 083c676 commit b16beb0df89e3b9c2c75daf994f0520435e6cd8e @luke-jr luke-jr committed Feb 21, 2012
Showing with 21 additions and 0 deletions.
  1. +7 −0 x86_32/sha256_xmm.asm
  2. +7 −0 x86_64/sha256_sse4_amd64.asm
  3. +7 −0 x86_64/sha256_xmm_amd64.asm
View
@@ -250,3 +250,10 @@ LAB_RET:
pop edi
pop esi
retn 4
+
+%ifidn __OUTPUT_FORMAT__,elf
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
+%ifidn __OUTPUT_FORMAT__,elf32
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
@@ -256,3 +256,10 @@ LAB_LOOP:
LAB_RET:
pop rbx
ret
+
+%ifidn __OUTPUT_FORMAT__,elf
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
+%ifidn __OUTPUT_FORMAT__,elf64
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
@@ -320,3 +320,10 @@ sha256_sse2_64_new:
LAB_RET:
pop rbx
ret
+
+%ifidn __OUTPUT_FORMAT__,elf
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
+%ifidn __OUTPUT_FORMAT__,elf64
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif

0 comments on commit b16beb0

Please sign in to comment.