Blob Blame History Raw
From 4e06fda2060d8696649260937f8a551815de24cf Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 11 Sep 2014 14:49:54 +0100
Subject: [PATCH 12/12] ppc, ppc64, ppc64le: Mark stack as non-executable.

The same fix as this one, which was only fully applied to
i686 & x86-64:

http://caml.inria.fr/mantis/view.php?id=4564
---
 asmrun/power-elf.S   | 3 +++
 asmrun/power64-elf.S | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/asmrun/power-elf.S b/asmrun/power-elf.S
index facbfbf..14d28a0 100644
--- a/asmrun/power-elf.S
+++ b/asmrun/power-elf.S
@@ -478,3 +478,6 @@ caml_system__frametable:
         .long   .L105 + 4       /* return address into callback */
         .short  -1              /* negative size count => use callback link */
         .short  0               /* no roots here */
+
+/* Mark stack as non-executable, PR#4564 */
+        .section .note.GNU-stack,"",%progbits
diff --git a/asmrun/power64-elf.S b/asmrun/power64-elf.S
index 98c42e2..b7bfce4 100644
--- a/asmrun/power64-elf.S
+++ b/asmrun/power64-elf.S
@@ -577,3 +577,5 @@ caml_system__frametable:
         .short  0               /* no roots here */
         .align  3
 
+/* Mark stack as non-executable, PR#4564 */
+        .section .note.GNU-stack,"",%progbits
-- 
2.0.4