Merge "Fix arguments passed to llvm-readobj" am: c48a9fb19c
Original change: https://android-review.googlesource.com/c/platform/build/+/1823794 Change-Id: I93dcd361b4139b02679d077a70b078bc08713e8a
This commit is contained in:
@@ -195,10 +195,12 @@ class ELFParser(object):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def _read_llvm_readobj(cls, elf_file_path, header, llvm_readobj):
|
def _read_llvm_readobj(cls, elf_file_path, header, llvm_readobj):
|
||||||
"""Run llvm-readobj and parse the output."""
|
"""Run llvm-readobj and parse the output."""
|
||||||
proc = subprocess.Popen(
|
cmd = [llvm_readobj, '--dynamic-table', '--dyn-symbols', elf_file_path]
|
||||||
[llvm_readobj, '-dynamic-table', '-dyn-symbols', elf_file_path],
|
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
|
||||||
out, _ = proc.communicate()
|
out, _ = proc.communicate()
|
||||||
|
rc = proc.returncode
|
||||||
|
if rc != 0:
|
||||||
|
raise subprocess.CalledProcessError(rc, cmd, out)
|
||||||
lines = out.splitlines()
|
lines = out.splitlines()
|
||||||
return cls._parse_llvm_readobj(elf_file_path, header, lines)
|
return cls._parse_llvm_readobj(elf_file_path, header, lines)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user