Non-executable stack in asm.

This commit is contained in:
Ben Laurie
2010-05-05 15:50:13 +00:00
parent f472ec8c2f
commit 0e3ef596e5
8 changed files with 18 additions and 1 deletions

View File

@@ -42,7 +42,8 @@ $verticalspin=1; # unlike 32-bit version $verticalspin performs
# ~15% better on both AMD and Intel cores
$speed_limit=512; # see aes-586.pl for details
$code=".text\n";
$code=".section .note.GNU-stack,\"\",\@progbits\n";
$code.=".text\n";
$s0="%eax";
$s1="%ebx";

View File

@@ -45,6 +45,7 @@ $m0="%rbx";
$m1="%rbp";
$code=<<___;
.section .note.GNU-stack,"",\@progbits
.text
.globl bn_mul_mont

View File

@@ -123,6 +123,7 @@ no warnings qw(uninitialized);
open STDOUT,"| $^X $xlate $flavour $output";
$code .= <<EOF;
.section .note.GNU-stack,"",\@progbits
.text
.align 16

View File

@@ -82,6 +82,7 @@ $YY="%r12";
$TY="%r13";
$code=<<___;
.section .note.GNU-stack,"",\@progbits
.text
.globl RC4

View File

@@ -178,6 +178,7 @@ unshift(@xi,pop(@xi));
}
$code.=<<___;
.section .note.GNU-stack,"",\@progbits
.text
.globl sha1_block_data_order

View File

@@ -178,6 +178,8 @@ ___
}
$code=<<___;
.section .note.GNU-stack,"",\@progbits
.text
.globl $func

View File

@@ -16,6 +16,13 @@ print<<___;
.section .init
call OPENSSL_cpuid_setup
___
if ($flavour =~ /elf/) {
print ".section .note.GNU-stack,\"\",\@progbits\n"
}
print<<___;
.text
.globl OPENSSL_atomic_add