tools/android/native_lib_memory/extract_symbols.py
def _GetSymbolNameToFilename(build_directory):
  """Parses object files in a directory, and maps mangled symbol names to files.

  Object files are assumed to actually be LLVM bitcode files, that is this
  assumes clang as the compiler and the use of LTO.

  Args:
    build_directory: (str) Build directory.

  Returns:
    {symbol name (str): object filename (str)}. Filenames are stripped of the
    output_directory part.
  """
  symbol_extractor.CheckLlvmNmExists()
  path = os.path.join(build_directory, 'obj')
  object_filenames = cyglog_to_orderfile.GetObjectFilenames(path)
  pool = multiprocessing.Pool()
  symbol_names_filename = zip(
      pool.map(symbol_extractor.SymbolNamesFromLlvmBitcodeFile,
               object_filenames),
      object_filenames)
  pool.close()
  result = {}
  for (symbol_names, filename) in symbol_names_filename:
    stripped_filename = filename[len(build_directory):]
    if stripped_filename.startswith('/obj/'):
      stripped_filename = stripped_filename[len('/obj/'):]
    for s in symbol_names:
      result[s] = stripped_filename
  return result
Parses object files in a directory, and maps mangled symbol names to files.

  Object files are assumed to actually be LLVM bitcode files, that is this
  assumes clang as the compiler and the use of LTO.

  Args:
    build_directory: (str) Build directory.

  Returns:
    {symbol name (str): object filename (str)}. Filenames are stripped of the
    output_directory part.
  
Parses object files in a directory, and maps mangled symbol names to files.
Object files are assumed to actually be LLVM bitcode files, that is this
assumes clang as the compiler and the use of LTO.
Parses object files in a directory and maps mangled symbol names to files . Object files are assumed to actually be LLVM bitcode files that is this assumes clang as the compiler and the use of LTO .
def _GetSymbolNameToFilename(build_directory):
  symbol_extractor.CheckLlvmNmExists()
  path = os.path.join(build_directory, 'obj')
  object_filenames = cyglog_to_orderfile.GetObjectFilenames(path)
  pool = multiprocessing.Pool()
  symbol_names_filename = zip(
      pool.map(symbol_extractor.SymbolNamesFromLlvmBitcodeFile,
               object_filenames),
      object_filenames)
  pool.close()
  result = {}
  for (symbol_names, filename) in symbol_names_filename:
    stripped_filename = filename[len(build_directory):]
    if stripped_filename.startswith('/obj/'):
      stripped_filename = stripped_filename[len('/obj/'):]
    for s in symbol_names:
      result[s] = stripped_filename
  return result
def _GetSymbolNameToFilename ( build_directory ) : symbol_extractor . CheckLlvmNmExists ( ) path = os . path . join ( build_directory , 'obj' ) object_filenames = cyglog_to_orderfile . GetObjectFilenames ( path ) pool = multiprocessing . Pool ( ) symbol_names_filename = zip ( pool . map ( symbol_extractor . SymbolNamesFromLlvmBitcodeFile , object_filenames ) , object_filenames ) pool . close ( ) result = { } for ( symbol_names , filename ) in symbol_names_filename : stripped_filename = filename [ len ( build_directory ) : ] if stripped_filename . startswith ( '/obj/' ) : stripped_filename = stripped_filename [ len ( '/obj/' ) : ] for s in symbol_names : result [ s ] = stripped_filename return result
Parses object files in a directory, and maps mangled symbol names to files.
Parses object files in a directory and maps mangled symbol names to files .
"""Parses object files in a directory, and maps mangled symbol names to files.

  Object files are assumed to actually be LLVM bitcode files, that is this
  assumes clang as the compiler and the use of LTO.

  Args:
    build_directory: (str) Build directory.

  Returns:
    {symbol name (str): object filename (str)}. Filenames are stripped of the
    output_directory part.
  """
{symbol name (str): object filename (str)}. Filenames are stripped of the
output_directory part.
{ symbol name ( str ) : object filename ( str ) } . Filenames are stripped of the output_directory part .
build_directory
(str) Build directory.
( str ) Build directory .