tools/cygprofile/cyglog_to_orderfile.py
def GetSymbolToSectionsMap(self):
    """Scans object files to find symbol section names.

    Returns:
      {symbol: linker section(s)}
    """
    if self._symbol_to_sections_map is not None:
      return self._symbol_to_sections_map

    symbol_infos = self._GetAllSymbolInfos()
    self._symbol_to_sections_map = {}
    symbol_warnings = cygprofile_utils.WarningCollector(300)
    for symbol_info in symbol_infos:
      symbol = symbol_info.name
      if symbol.startswith('.LTHUNK'):
        continue
      section = symbol_info.section
      if ((symbol in self._symbol_to_sections_map) and
          (symbol_info.section not in self._symbol_to_sections_map[symbol])):
        self._symbol_to_sections_map[symbol].append(section)

        if not self._SameCtorOrDtorNames(
            symbol, self._symbol_to_sections_map[symbol][0].lstrip('.text.')):
          symbol_warnings.Write('Symbol ' + symbol +
                                ' unexpectedly in more than one section: ' +
                                ', '.join(self._symbol_to_sections_map[symbol]))
      elif not section.startswith('.text.'):
        # Assembly functions have section ".text". These are all grouped
        # together near the end of the orderfile via an explicit ".text" entry.
        if section != '.text':
          symbol_warnings.Write('Symbol ' + symbol +
                                ' in incorrect section ' + section)
      else:
        # In most cases we expect just one item in this list, and maybe 4 or so
        # in the worst case.
        self._symbol_to_sections_map[symbol] = [section]
    symbol_warnings.WriteEnd('bad sections')
    return self._symbol_to_sections_map
Scans object files to find symbol section names.

    Returns:
      {symbol: linker section(s)}
    
Scans object files to find symbol section names.
Scans object files to find symbol section names .
def GetSymbolToSectionsMap(self):
    if self._symbol_to_sections_map is not None:
      return self._symbol_to_sections_map
    symbol_infos = self._GetAllSymbolInfos()
    self._symbol_to_sections_map = {}
    symbol_warnings = cygprofile_utils.WarningCollector(300)
    for symbol_info in symbol_infos:
      symbol = symbol_info.name
      if symbol.startswith('.LTHUNK'):
        continue
      section = symbol_info.section
      if ((symbol in self._symbol_to_sections_map) and
          (symbol_info.section not in self._symbol_to_sections_map[symbol])):
        self._symbol_to_sections_map[symbol].append(section)
        if not self._SameCtorOrDtorNames(
            symbol, self._symbol_to_sections_map[symbol][0].lstrip('.text.')):
          symbol_warnings.Write('Symbol ' + symbol +
                                ' unexpectedly in more than one section: ' +
                                ', '.join(self._symbol_to_sections_map[symbol]))
      elif not section.startswith('.text.'):
        if section != '.text':
          symbol_warnings.Write('Symbol ' + symbol +
                                ' in incorrect section ' + section)
      else:
        self._symbol_to_sections_map[symbol] = [section]
    symbol_warnings.WriteEnd('bad sections')
    return self._symbol_to_sections_map
def GetSymbolToSectionsMap ( self ) : if self . _symbol_to_sections_map is not None : return self . _symbol_to_sections_map symbol_infos = self . _GetAllSymbolInfos ( ) self . _symbol_to_sections_map = { } symbol_warnings = cygprofile_utils . WarningCollector ( 300 ) for symbol_info in symbol_infos : symbol = symbol_info . name if symbol . startswith ( '.LTHUNK' ) : continue section = symbol_info . section if ( ( symbol in self . _symbol_to_sections_map ) and ( symbol_info . section not in self . _symbol_to_sections_map [ symbol ] ) ) : self . _symbol_to_sections_map [ symbol ] . append ( section ) if not self . _SameCtorOrDtorNames ( symbol , self . _symbol_to_sections_map [ symbol ] [ 0 ] . lstrip ( '.text.' ) ) : symbol_warnings . Write ( 'Symbol ' + symbol + ' unexpectedly in more than one section: ' + ', ' . join ( self . _symbol_to_sections_map [ symbol ] ) ) elif not section . startswith ( '.text.' ) : if section != '.text' : symbol_warnings . Write ( 'Symbol ' + symbol + ' in incorrect section ' + section ) else : self . _symbol_to_sections_map [ symbol ] = [ section ] symbol_warnings . WriteEnd ( 'bad sections' ) return self . _symbol_to_sections_map
Scans object files to find symbol section names.
Scans object files to find symbol section names .
"""Scans object files to find symbol section names.

    Returns:
      {symbol: linker section(s)}
    """ # Assembly functions have section ".text". These are all grouped # together near the end of the orderfile via an explicit ".text" entry. # In most cases we expect just one item in this list, and maybe 4 or so # in the worst case.
None
{symbol
self