tools/mac/show_mod_init_func.py
def GetModuleInitializers(binary, xcode_path):
  """Parses the __DATA,__mod_init_func segment of |binary| and returns a list
  of string hexadecimal addresses of the module initializers.
  """
  if xcode_path:
    otool_path = os.path.join(xcode_path, 'Contents', 'Developer',
        'Toolchains', 'XcodeDefault.xctoolchain', 'usr', 'bin', 'otool')
  else:
    otool_path = 'otool'
  # The -v flag will display the addresses in a usable form (as opposed to
  # just its on-disk little-endian byte representation).
  otool = [otool_path, '-v', '-s', '__DATA', '__mod_init_func', binary]
  lines = subprocess.check_output(otool).strip().split('\n')

  # Skip the first two header lines and then get the address of the
  # initializer in the second column. The first address is the address
  # of the initializer pointer.
  #   out/gn/Chromium Framework.unstripped:
  #   Contents of (__DATA,__mod_init_func) section
  #   0x0000000008761498 0x000000000385d120
  return [line.split(' ')[1] for line in lines[2:]]
Parses the __DATA,__mod_init_func segment of |binary| and returns a list
  of string hexadecimal addresses of the module initializers.
  
Parses the __DATA,__mod_init_func segment of |binary| and returns a list
of string hexadecimal addresses of the module initializers.
Parses the __DATA __mod_init_func segment of |binary| and returns a list of string hexadecimal addresses of the module initializers .
def GetModuleInitializers(binary, xcode_path):
  if xcode_path:
    otool_path = os.path.join(xcode_path, 'Contents', 'Developer',
        'Toolchains', 'XcodeDefault.xctoolchain', 'usr', 'bin', 'otool')
  else:
    otool_path = 'otool'
  otool = [otool_path, '-v', '-s', '__DATA', '__mod_init_func', binary]
  lines = subprocess.check_output(otool).strip().split('\n')
  return [line.split(' ')[1] for line in lines[2:]]
def GetModuleInitializers ( binary , xcode_path ) : if xcode_path : otool_path = os . path . join ( xcode_path , 'Contents' , 'Developer' , 'Toolchains' , 'XcodeDefault.xctoolchain' , 'usr' , 'bin' , 'otool' ) else : otool_path = 'otool' otool = [ otool_path , '-v' , '-s' , '__DATA' , '__mod_init_func' , binary ] lines = subprocess . check_output ( otool ) . strip ( ) . split ( '\n' ) return [ line . split ( ' ' ) [ 1 ] for line in lines [ 2 : ] ]
Parses the __DATA,__mod_init_func segment of |binary| and returns a list
of string hexadecimal addresses of the module initializers.
Parses the __DATA __mod_init_func segment of |binary| and returns a list of string hexadecimal addresses of the module initializers .
"""Parses the __DATA,__mod_init_func segment of |binary| and returns a list
  of string hexadecimal addresses of the module initializers.
  """ # The -v flag will display the addresses in a usable form (as opposed to # just its on-disk little-endian byte representation). # Skip the first two header lines and then get the address of the # initializer in the second column. The first address is the address # of the initializer pointer. #   out/gn/Chromium Framework.unstripped: #   Contents of (__DATA,__mod_init_func) section #   0x0000000008761498 0x000000000385d120
binary
xcode_path