Index: native_client_sdk/src/tools/lib/get_shared_deps.py |
diff --git a/native_client_sdk/src/tools/lib/get_shared_deps.py b/native_client_sdk/src/tools/lib/get_shared_deps.py |
index 5325df9e6af8bbf186dd74f689c25ae877a68a50..5a3a658f09bec8e779fd58f1608f1e4f20c8cf8c 100644 |
--- a/native_client_sdk/src/tools/lib/get_shared_deps.py |
+++ b/native_client_sdk/src/tools/lib/get_shared_deps.py |
@@ -210,9 +210,16 @@ |
files = [] |
for dirname in lib_path: |
# The libc.so files in the the glibc toolchain is actually a linker |
- # script which references libc.so.<SHA1>. This means the libc.so itself |
- # does not end up in the NEEDED section for glibc. |
- if name == 'libc.so': |
+ # script which references libc.so.<SHA1>. This means the lib.so itself |
+ # does not end up in the NEEDED section for glibc. However with bionic |
+ # the SONAME is actually libc.so. If we pass glibc's libc.so to objdump |
+ # if fails to parse it, os this filters out libc.so expept for within |
+ # the bionic toolchain. |
+ # TODO(bradnelson): Remove this once the SONAME in bionic is made to be |
+ # unique in the same it is under glibc: |
+ # https://code.google.com/p/nativeclient/issues/detail?id=3833 |
+ rel_dirname = os.path.relpath(dirname, SDK_DIR) |
+ if name == 'libc.so' and 'bionic' not in rel_dirname: |
continue |
filename = os.path.join(dirname, name) |
if os.path.exists(filename): |