From 591b7f232b47879d681cf679c17a415e4eddfe90 Mon Sep 17 00:00:00 2001 From: "fbarchard@google.com" Date: Wed, 12 Dec 2012 23:23:15 +0000 Subject: [PATCH] Mark stack as not executable. Although its tempting to generate code and execute it as an optimization, security says this is a bad thing. BUG=none TEST=none Review URL: https://webrtc-codereview.appspot.com/989005 git-svn-id: http://libyuv.googlecode.com/svn/trunk@518 16f28f9a-4ce2-e073-06de-1de4eb20be90 --- source/row_x86.asm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/row_x86.asm b/source/row_x86.asm index 11650c040..6100e9b5d 100644 --- a/source/row_x86.asm +++ b/source/row_x86.asm @@ -15,6 +15,16 @@ %endif %include "x86inc.asm" +%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 +%ifidn __OUTPUT_FORMAT__,elf64 +section .note.GNU-stack noalloc noexec nowrite progbits +%endif + SECTION .text ; cglobal numeric constants are parameters, gpr regs, mm regs