Blame SOURCES/00010-2.7.13-binutils-no-dep.patch
|
|
1fe57a |
diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
|
|
|
1fe57a |
index ab10ec5..923d1b7 100644
|
|
|
1fe57a |
--- a/Lib/ctypes/util.py
|
|
|
1fe57a |
+++ b/Lib/ctypes/util.py
|
|
|
1fe57a |
@@ -140,11 +140,15 @@ elif os.name == "posix":
|
|
|
1fe57a |
# assuming GNU binutils / ELF
|
|
|
1fe57a |
if not f:
|
|
|
1fe57a |
return None
|
|
|
1fe57a |
- cmd = 'if ! type objdump >/dev/null 2>&1; then exit; fi;' \
|
|
|
1fe57a |
+ cmd = 'if ! type objdump >/dev/null 2>&1; then exit 10; fi;' \
|
|
|
1fe57a |
'objdump -p -j .dynamic 2>/dev/null "$1"'
|
|
|
1fe57a |
proc = subprocess.Popen((cmd, '_get_soname', f), shell=True,
|
|
|
1fe57a |
stdout=subprocess.PIPE)
|
|
|
1fe57a |
[dump, _] = proc.communicate()
|
|
|
1fe57a |
+ if proc.returncode == 10:
|
|
|
1fe57a |
+ return os.path.basename(f) # This is good for GLibc, I think,
|
|
|
1fe57a |
+ # and a dep on binutils is big (for
|
|
|
1fe57a |
+ # live CDs).
|
|
|
1fe57a |
res = re.search(br'\sSONAME\s+([^\s]+)', dump)
|
|
|
1fe57a |
if not res:
|
|
|
1fe57a |
return None
|