diff options
author | Siarhei Siamashka <siarhei.siamashka@gmail.com> | 2011-12-23 01:34:41 +0200 |
---|---|---|
committer | Siarhei Siamashka <siarhei.siamashka@gmail.com> | 2011-12-23 01:34:41 +0200 |
commit | a61939e965844e81878be4db7be791672413c009 (patch) | |
tree | f1974f56dd637bde78b5bdb81fd1c1ddfc301f9e | |
parent | 57a4a82cbc6e4db3e20e7f858499a93a339effb0 (diff) |
Mark stack as non-executable in x86 assembly files
-rw-r--r-- | scrypt-x64.S | 4 | ||||
-rw-r--r-- | scrypt-x86.S | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/scrypt-x64.S b/scrypt-x64.S index 04af376..e304aa9 100644 --- a/scrypt-x64.S +++ b/scrypt-x64.S @@ -22,6 +22,10 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. +#if defined(__linux__) && defined(__ELF__) +.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */ +#endif + #if defined(__x86_64__) .macro x64_gen_salsa8_core_doubleround diff --git a/scrypt-x86.S b/scrypt-x86.S index 52560c5..f711d44 100644 --- a/scrypt-x86.S +++ b/scrypt-x86.S @@ -22,6 +22,10 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. +#if defined(__linux__) && defined(__ELF__) +.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */ +#endif + #if defined(__i386__) .macro x86_gen_salsa8_core_quadround |