summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-07-09 11:06:17 +0100
committerIan Lynagh <ian@well-typed.com>2013-07-09 11:06:17 +0100
commitca9a431401755f119d97dec59a1fc963a8e9f681 (patch)
treea596a139b4025da1d7c5f65ce3d2782b22060c7a
parent12ed5c2bd257e0753326b563f0f9b7619fb67b38 (diff)
parent08a38628f29df63ac842f4d083efb414f42d7bff (diff)
downloadhaskell-ca9a431401755f119d97dec59a1fc963a8e9f681.tar.gz
Merge branch 'master' of http://darcs.haskell.org/ghc
-rw-r--r--compiler/main/DriverPipeline.hs12
1 files changed, 11 insertions, 1 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 67377e68c2..26425ae29b 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1640,7 +1640,17 @@ mkNoteObjsToLinkIntoBinary dflags dep_packages = do
text elfSectionNote,
text "\n",
- text "\t.ascii \"", info', text "\"\n" ]
+ text "\t.ascii \"", info', text "\"\n",
+
+ -- ALL generated assembly must have this section to disable
+ -- executable stacks. See also
+ -- compiler/nativeGen/AsmCodeGen.lhs for another instance
+ -- where we need to do this.
+ (if platformHasGnuNonexecStack (targetPlatform dflags)
+ then text ".section .note.GNU-stack,\"\",@progbits\n"
+ else empty)
+
+ ]
where
info' = text $ escape info