[commit: ghc] ghc-7.10: arm: Force non-executable stack (#10369) (2d3d0cd)

git at git.haskell.org git at git.haskell.org
Wed May 6 12:57:30 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-7.10
Link       : http://ghc.haskell.org/trac/ghc/changeset/2d3d0cd8a33b566c5c6263ee81442c0ef3c68785/ghc

>---------------------------------------------------------------

commit 2d3d0cd8a33b566c5c6263ee81442c0ef3c68785
Author: Erik de Castro Lopo <erikd at mega-nerd.com>
Date:   Fri May 1 20:33:03 2015 +1000

    arm: Force non-executable stack (#10369)
    
    Test `T703` was found to be failing on arm/linux. The solution
    was to add a linker flag to explicitly set the stack to
    non-executable.
    
    Signed-off-by: Erik de Castro Lopo <erikd at mega-nerd.com>
    
    Test Plan: validate on x86_64 and arm linux
    
    Reviewers: ezyang, rwbarton, austin
    
    Subscribers: bgamari, thomie
    
    Differential Revision: https://phabricator.haskell.org/D875
    
    GHC Trac Issues: #10369
    
    (cherry picked from commit 63a10bbc42492c58feb377d79e05a185e6efcd5a)


>---------------------------------------------------------------

2d3d0cd8a33b566c5c6263ee81442c0ef3c68785
 aclocal.m4 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/aclocal.m4 b/aclocal.m4
index c08a28e..b275460 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -570,7 +570,8 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS],
         # On arm/linux, aarch64/linux, arm/android and aarch64/android, tell
         # gcc to link using the gold linker.
         # Forcing LD to be ld.gold is done in FIND_LD m4 macro.
-        $3="$$3 -fuse-ld=gold"
+        $3="$$3 -fuse-ld=gold -Wl,-z,noexecstack"
+        $4="$$4 -z,noexecstack"
         ;;
     esac
 



More information about the ghc-commits mailing list