Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r45663:eef75a4b072e
Date: 2011-07-16 16:06 +0200
http://bitbucket.org/pypy/pypy/changeset/eef75a4b072e/

Log:    Write the progbits section magic marker to make the stack
        non-executable under (at least) Gentoo linux. Thanks Amaury.

diff --git a/pypy/translator/c/gcc/trackgcroot.py 
b/pypy/translator/c/gcc/trackgcroot.py
--- a/pypy/translator/c/gcc/trackgcroot.py
+++ b/pypy/translator/c/gcc/trackgcroot.py
@@ -1824,6 +1824,11 @@
             __gccallshapes:
             """.replace("__gccallshapes", _globalname("__gccallshapes"))
             output.writelines(shapelines)
+            print >> output, """\
+            #if defined(__linux__) && defined(__ELF__)
+            .section .note.GNU-stack,"",%progbits
+            #endif
+            """
 
     def process(self, iterlines, newfile, filename='?'):
         parser = PARSERS[format](verbose=self.verbose, shuffle=self.shuffle)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to