tools/binary_size/libsupersize/readelf.py
def BuildIdFromElf(elf_path, tool_prefix):
  """Returns the Build ID for the given binary."""
  args = [path_util.GetReadElfPath(tool_prefix), '-n', elf_path]
  stdout = subprocess.check_output(args, encoding='ascii')
  match = re.search(r'Build ID: (\w+)', stdout)
  assert match, 'Build ID not found from running: ' + ' '.join(args)
  return match.group(1)
Returns the Build ID for the given binary.
Returns the Build ID for the given binary.
Returns the Build ID for the given binary .
def BuildIdFromElf(elf_path, tool_prefix):
  args = [path_util.GetReadElfPath(tool_prefix), '-n', elf_path]
  stdout = subprocess.check_output(args, encoding='ascii')
  match = re.search(r'Build ID: (\w+)', stdout)
  assert match, 'Build ID not found from running: ' + ' '.join(args)
  return match.group(1)
def BuildIdFromElf ( elf_path , tool_prefix ) : args = [ path_util . GetReadElfPath ( tool_prefix ) , '-n' , elf_path ] stdout = subprocess . check_output ( args , encoding = 'ascii' ) match = re . search ( r'Build ID: (\w+)' , stdout ) assert match , 'Build ID not found from running: ' + ' ' . join ( args ) return match . group ( 1 )
Returns the Build ID for the given binary.
Returns the Build ID for the given binary .
"""Returns the Build ID for the given binary."""
elf_path
tool_prefix