From 01faf1356f648ded9acda02e7cc67c1adb9e9ee3 Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Fri, 14 Nov 2014 17:59:57 -0800 Subject: [PATCH] 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) --- src/common/crc32c_intel_fast_asm.S | 2 ++ src/common/crc32c_intel_fast_zero_asm.S | 2 ++ 2 files changed, 4 insertions(+) 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 -- 2.47.3