[commit: ghc] master: arm: Force non-executable stack (#10369) (63a10bb)

git at git.haskell.org git at git.haskell.org
Mon May 4 22:16:32 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/63a10bbc42492c58feb377d79e05a185e6efcd5a/ghc

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

commit 63a10bbc42492c58feb377d79e05a185e6efcd5a
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


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

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

diff --git a/aclocal.m4 b/aclocal.m4
index d6352cf..bb46fda 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