Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc7eeeba authored by Yi Kong's avatar Yi Kong Committed by Automerger Merge Worker
Browse files

Merge "Fix arguments passed to llvm-readobj" am: c48a9fb1 am: 5353d0f3

Original change: https://android-review.googlesource.com/c/platform/build/+/1823794

Change-Id: If8aaa49e5dc408bab83f2f2470a9df0e81dc2981
parents 43af41b5 5353d0f3
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -195,10 +195,12 @@ class ELFParser(object):
  @classmethod
  def _read_llvm_readobj(cls, elf_file_path, header, llvm_readobj):
    """Run llvm-readobj and parse the output."""
    proc = subprocess.Popen(
      [llvm_readobj, '-dynamic-table', '-dyn-symbols', elf_file_path],
      stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    cmd = [llvm_readobj, '--dynamic-table', '--dyn-symbols', elf_file_path]
    proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    out, _ = proc.communicate()
    rc = proc.returncode
    if rc != 0:
      raise subprocess.CalledProcessError(rc, cmd, out)
    lines = out.splitlines()
    return cls._parse_llvm_readobj(elf_file_path, header, lines)