tools/linux/dump-static-initializers.py
def ParseNm(toolchain, binary):
  """Yield static initializers for the given binary.

  Given a binary, yield static initializers as (file, start, size, symbol)
  tuples."""
  nm = subprocess.Popen([toolchain + 'nm', '-S', binary],
                        stdout=subprocess.PIPE,
                        universal_newlines=True)
  for line in nm.stdout:
    parse = ParseNmLine(line)
    if parse:
      yield parse
Yield static initializers for the given binary.

  Given a binary, yield static initializers as (file, start, size, symbol)
  tuples.
Yield static initializers for the given binary.
Given a binary, yield static initializers as (file, start, size, symbol)
tuples.
Yield static initializers for the given binary . Given a binary yield static initializers as ( file start size symbol ) tuples .
def ParseNm(toolchain, binary):
  nm = subprocess.Popen([toolchain + 'nm', '-S', binary],
                        stdout=subprocess.PIPE,
                        universal_newlines=True)
  for line in nm.stdout:
    parse = ParseNmLine(line)
    if parse:
      yield parse
def ParseNm ( toolchain , binary ) : nm = subprocess . Popen ( [ toolchain + 'nm' , '-S' , binary ] , stdout = subprocess . PIPE , universal_newlines = True ) for line in nm . stdout : parse = ParseNmLine ( line ) if parse : yield parse
Yield static initializers for the given binary.
Yield static initializers for the given binary .
"""Yield static initializers for the given binary.

  Given a binary, yield static initializers as (file, start, size, symbol)
  tuples."""
toolchain
binary