From: Dan Mick Date: Sat, 15 Nov 2014 01:59:57 +0000 (-0800) Subject: Add annotation to all assembly files to turn off stack-execute bit X-Git-Tag: v0.80.8~25^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F2961%2Fhead;p=ceph.git Add annotation to all assembly files to turn off stack-execute bit See discussion in http://tracker.ceph.com/issues/10114 Building with these changes allows output from readelf like this: $ readelf -lW src/.libs/librados.so.2 | grep GNU_STACK GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0x8 (note the absence of 'X' in 'RW') Fixes: #10114 Signed-off-by: Dan Mick (cherry picked from commit 06a245a9845c0c126fb3106b41b2fd2bc4bc4df3) (not-yet-present-in-firefly files in isa-l manually removed) --- diff --git a/src/common/crc32c_intel_fast_asm.S b/src/common/crc32c_intel_fast_asm.S index 4ca5d65032e..2189684b4c7 100644 --- a/src/common/crc32c_intel_fast_asm.S +++ b/src/common/crc32c_intel_fast_asm.S @@ -662,3 +662,5 @@ global %1_slver %endmacro ;;; func core, ver, snum slversion crc32_iscsi_00, 00, 02, 0014 +; inform linker that this doesn't require executable stack +section .note.GNU-stack noalloc noexec nowrite progbits diff --git a/src/common/crc32c_intel_fast_zero_asm.S b/src/common/crc32c_intel_fast_zero_asm.S index b7246f26380..34b7f489016 100644 --- a/src/common/crc32c_intel_fast_zero_asm.S +++ b/src/common/crc32c_intel_fast_zero_asm.S @@ -644,3 +644,5 @@ global %1_slver %endmacro ;;; func core, ver, snum slversion crc32_iscsi_zero_00, 00, 02, 0014 +; inform linker that this doesn't require executable stack +section .note.GNU-stack noalloc noexec nowrite progbits