parameters: (self)
return_statement: return result
docstring: Returns a dict about folded sections.
          When section A and B are folded into section C, the dict contains:
          { 'A': 'C',
            'B': 'C',
            'C': ['A', 'B'] }
docstring_summary: Returns a dict about folded sections.
          When section A and B are folded into section C, the dict contains:
          { 'A': 'C',
            'B': 'C',
            'C': ['A', 'B'] }
docstring_tokens: Returns a dict about folded sections . When section A and B are folded into section C the dict contains : { A : C B : C C : [ A B ] }
function: def _getFoldedSections(self):
          '''Returns a dict about folded sections.
          When section A and B are folded into section C, the dict contains:
          { 'A': 'C',
            'B': 'C',
            'C': ['A', 'B'] }'''
          if not conf.LD_PRINT_ICF_SECTIONS:
              return {}
  
          proc = subprocess.Popen(self + [conf.LD_PRINT_ICF_SECTIONS], stdout = subprocess.PIPE, stderr = subprocess.PIPE)
          (stdout, stderr) = proc.communicate()
          result = {}
          # gold's --print-icf-sections output looks like the following:
          # ld: ICF folding section '.section' in file 'file.o'into '.section' in file 'file.o'
          # In terms of words, chances are this will change in the future,
          # especially considering "into" is misplaced. Splitting on quotes
          # seems safer.
          for l in stderr.split('\n'):
              quoted = l.split("'")
              if len(quoted) > 5 and quoted[1] != quoted[5]:
                  result[quoted[1]] = [quoted[5]]
                  if quoted[5] in result:
                      result[quoted[5]].append(quoted[1])
                  else:
                      result[quoted[5]] = [quoted[1]]
          return result
function_tokens: def _getFoldedSections ( self ) : if not conf . LD_PRINT_ICF_SECTIONS : return { } proc = subprocess . Popen ( self + [ conf . LD_PRINT_ICF_SECTIONS ] , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) ( stdout , stderr ) = proc . communicate ( ) result = { } # gold's --print-icf-sections output looks like the following: # ld: ICF folding section '.section' in file 'file.o'into '.section' in file 'file.o' # In terms of words, chances are this will change in the future, # especially considering "into" is misplaced. Splitting on quotes # seems safer. for l in stderr . split ( '\n' ) : quoted = l . split ( "'" ) if len ( quoted ) > 5 and quoted [ 1 ] != quoted [ 5 ] : result [ quoted [ 1 ] ] = [ quoted [ 5 ] ] if quoted [ 5 ] in result : result [ quoted [ 5 ] ] . append ( quoted [ 1 ] ) else : result [ quoted [ 5 ] ] = [ quoted [ 1 ] ] return result