Gentoo's scanelf program found executable stack in many resulting binaries:
authorSergei Trofimovich <slyfox@gentoo.org>
Sat, 17 Sep 2011 10:29:44 +0000 (11:29 +0100)
committerIan Lynagh <igloo@earth.li>
Sat, 17 Sep 2011 10:30:04 +0000 (11:30 +0100)
* RWX --- --- home/prefix/gentoo/usr/lib/ghc-7.2.1/ghc
* !WX --- --- home/prefix/gentoo/usr/lib/ghc-7.2.1/libHSrts.a:AdjustorAsm.o

More info can be found here: http://www.gentoo.org/proj/en/hardened/gnu-stack.xml

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
rts/AdjustorAsm.S

index 75b83f6..ca7ae36 100644 (file)
@@ -192,3 +192,7 @@ adjustorCode:
     ret
 #endif
 
+/* mark stack as nonexecutable */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",@progbits
+#endif