parameters: (binary, start, end)
return_statement: return sorted(refs)
docstring: Given a span of addresses, returns symbol references from disassembly.
docstring_summary: Given a span of addresses, returns symbol references from disassembly.
docstring_tokens: Given a span of addresses returns symbol references from disassembly .
function: def ExtractSymbolReferences(binary, start, end):
    """Given a span of addresses, returns symbol references from disassembly."""
    cmd = ['objdump', binary, '--disassemble',
           '--start-address=0x%x' % start, '--stop-address=0x%x' % end]
    objdump = subprocess.Popen(cmd, stdout=subprocess.PIPE)
  
    refs = set()
    for line in objdump.stdout:
      if '__static_initialization_and_destruction' in line:
        raise RuntimeError, ('code mentions '
                             '__static_initialization_and_destruction; '
                             'did you accidentally run this on a Debug binary?')
      match = disassembly_re.search(line)
      if match:
        (ref,) = match.groups()
        if ref.startswith('.LC') or ref.startswith('_DYNAMIC'):
          # Ignore these, they are uninformative.
          continue
        if ref.startswith('_GLOBAL__I_'):
          # Probably a relative jump within this function.
          continue
        refs.add(ref)
  
    return sorted(refs)
function_tokens: def ExtractSymbolReferences ( binary , start , end ) : cmd = [ 'objdump' , binary , '--disassemble' , '--start-address=0x%x' % start , '--stop-address=0x%x' % end ] objdump = subprocess . Popen ( cmd , stdout = subprocess . PIPE ) refs = set ( ) for line in objdump . stdout : if '__static_initialization_and_destruction' in line : raise RuntimeError , ( 'code mentions ' '__static_initialization_and_destruction; ' 'did you accidentally run this on a Debug binary?' ) match = disassembly_re . search ( line ) if match : ( ref , ) = match . groups ( ) if ref . startswith ( '.LC' ) or ref . startswith ( '_DYNAMIC' ) : # Ignore these, they are uninformative. continue if ref . startswith ( '_GLOBAL__I_' ) : # Probably a relative jump within this function. continue refs . add ( ref ) return sorted ( refs )