[pypy-commit] pypy default: the .debug files don't need to be executable, remove the 'x' bit
antocuni
pypy.commits at gmail.com
Thu Nov 2 07:03:14 EDT 2017
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch:
Changeset: r92904:84a682f2e00a
Date: 2017-11-02 11:59 +0100
http://bitbucket.org/pypy/pypy/changeset/84a682f2e00a/
Log: the .debug files don't need to be executable, remove the 'x' bit
diff --git a/pypy/tool/release/smartstrip.py b/pypy/tool/release/smartstrip.py
--- a/pypy/tool/release/smartstrip.py
+++ b/pypy/tool/release/smartstrip.py
@@ -19,6 +19,9 @@
if sys.platform == 'linux2':
os.system("objcopy --only-keep-debug %s %s" % (exe, debug))
os.system("objcopy --add-gnu-debuglink=%s %s" % (debug, exe))
+ perm = debug.stat().mode
+ perm &= ~(0111) # remove the 'x' bit
+ debug.chmod(perm)
def smartstrip(exe, keep_debug=True):
exe = py.path.local(exe)
diff --git a/pypy/tool/release/test/test_smartstrip.py b/pypy/tool/release/test/test_smartstrip.py
--- a/pypy/tool/release/test/test_smartstrip.py
+++ b/pypy/tool/release/test/test_smartstrip.py
@@ -42,6 +42,9 @@
smartstrip(exe, keep_debug=True)
debug = tmpdir.join("myprog.debug")
assert debug.check(file=True)
+ perm = debug.stat().mode & 0777
+ assert perm & 0111 == 0 # 'x' bit not set
+ #
info = info_symbol(exe, "foo")
assert info == "foo in section .text of %s" % exe
#
More information about the pypy-commit
mailing list