Merge pull request #5471 from sjackman/needed-libraries

needed_libraries: Fix cannot find section .dynamic
This commit is contained in:
Shaun Jackman 2019-01-02 12:56:46 -08:00 committed by GitHub
commit 79bc35320f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,6 +117,8 @@ module ELFShim
end end
def needed_libraries_using_patchelf(path) def needed_libraries_using_patchelf(path)
return [nil, []] unless path.dynamic_elf?
patchelf = DevelopmentTools.locate "patchelf" patchelf = DevelopmentTools.locate "patchelf"
if path.dylib? if path.dylib?
command = [patchelf, "--print-soname", path.expand_path.to_s] command = [patchelf, "--print-soname", path.expand_path.to_s]