Blame SOURCES/0004-prevent-having-executable-stack.patch

f567cd
From 619b42357a3743c9d3d006d7cc7b57d6a45f033c Mon Sep 17 00:00:00 2001
f567cd
From: Michal Schmidt <mschmidt@redhat.com>
f567cd
Date: Mon, 31 Aug 2015 23:58:29 +0200
f567cd
Subject: [PATCH] prevent having executable stack
f567cd
f567cd
Add .note.GNU-stack sections to objects compiled from assembly.
f567cd
This allows libpsm2.so.2.0 to have non-executable stack.
f567cd
---
f567cd
 opa/opa_dwordcpy-i386.S        | 4 ++++
f567cd
 opa/opa_dwordcpy-x86_64-fast.S | 4 ++++
f567cd
 2 files changed, 8 insertions(+)
f567cd
f567cd
diff --git a/opa/opa_dwordcpy-i386.S b/opa/opa_dwordcpy-i386.S
f567cd
index 140c5d18bd..f3d898ded7 100644
f567cd
--- a/opa/opa_dwordcpy-i386.S
f567cd
+++ b/opa/opa_dwordcpy-i386.S
f567cd
@@ -78,3 +78,7 @@ hfi_dwordcpy:
f567cd
 	mov %eax,%edi
f567cd
 	mov %edx,%esi
f567cd
 	ret
f567cd
+
f567cd
+#if defined(__linux__) && defined(__ELF__)
f567cd
+.section .note.GNU-stack,"",%progbits
f567cd
+#endif
f567cd
diff --git a/opa/opa_dwordcpy-x86_64-fast.S b/opa/opa_dwordcpy-x86_64-fast.S
f567cd
index 63e209f890..fe07ebfa92 100644
f567cd
--- a/opa/opa_dwordcpy-x86_64-fast.S
f567cd
+++ b/opa/opa_dwordcpy-x86_64-fast.S
f567cd
@@ -71,3 +71,7 @@ hfi_dwordcpy:
f567cd
 	rep
f567cd
 	movsd
f567cd
 	ret
f567cd
+
f567cd
+#if defined(__linux__) && defined(__ELF__)
f567cd
+.section .note.GNU-stack,"",%progbits
f567cd
+#endif
f567cd
-- 
f567cd
2.4.3
f567cd