Read about our upcoming Code of Conduct on this issue

Commit c65d4106 authored by Antonio Cuni's avatar Antonio Cuni
Browse files

the .debug files don't need to be executable, remove the 'x' bit

parent a2348b760a36
...@@ -19,6 +19,9 @@ def _extract_debug_symbols(exe, debug): ...@@ -19,6 +19,9 @@ def _extract_debug_symbols(exe, debug):
if sys.platform == 'linux2': if sys.platform == 'linux2':
os.system("objcopy --only-keep-debug %s %s" % (exe, debug)) os.system("objcopy --only-keep-debug %s %s" % (exe, debug))
os.system("objcopy --add-gnu-debuglink=%s %s" % (debug, exe)) 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): def smartstrip(exe, keep_debug=True):
exe = py.path.local(exe) exe = py.path.local(exe)
......
...@@ -42,6 +42,9 @@ class TestSmarStrip(object): ...@@ -42,6 +42,9 @@ class TestSmarStrip(object):
smartstrip(exe, keep_debug=True) smartstrip(exe, keep_debug=True)
debug = tmpdir.join("myprog.debug") debug = tmpdir.join("myprog.debug")
assert debug.check(file=True) assert debug.check(file=True)
perm = debug.stat().mode & 0777
assert perm & 0111 == 0 # 'x' bit not set
#
info = info_symbol(exe, "foo") info = info_symbol(exe, "foo")
assert info == "foo in section .text of %s" % exe assert info == "foo in section .text of %s" % exe
# #
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment