ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BinaryLoaderElf::SymbolMapEntry Struct Reference

An entry for a SymbolMap. More...

#include <BinaryLoaderElf.h>

Public Member Functions

const VersionedSymbolget_vsymbol () const
 Returns the base version. More...
 
SgAsmElfSymbolget_symbol () const
 Returns the ELF symbol from the base version. More...
 
VersionedSymbol get_vsymbol (const VersionedSymbol &version) const
 Find definition of symbol. More...
 
SgAsmElfSymbolSectionget_section () const
 Returns the section where the base version symbol was defined. More...
 
void addVersion (const VersionedSymbol &vsymbol)
 Add an additional versioned symbol to this entry. More...
 
void merge (const SymbolMapEntry &)
 Merge the versions from the specified entry into this entry. More...
 
void dump (FILE *, const char *prefix) const
 Print info about this symbol map entry. More...
 

Private Member Functions

const VersionedSymbolget_base_version () const
 

Private Attributes

std::vector< VersionedSymbolp_versions
 

Detailed Description

An entry for a SymbolMap.

Each entry holds a list of related versioned symbols, the first of which is the base definition.

Definition at line 150 of file BinaryLoaderElf.h.

Member Function Documentation

const VersionedSymbol& BinaryLoaderElf::SymbolMapEntry::get_vsymbol ( ) const
inline

Returns the base version.

Definition at line 156 of file BinaryLoaderElf.h.

References get_base_version().

Referenced by get_section(), and get_symbol().

SgAsmElfSymbol* BinaryLoaderElf::SymbolMapEntry::get_symbol ( ) const
inline

Returns the ELF symbol from the base version.

Definition at line 161 of file BinaryLoaderElf.h.

References BinaryLoaderElf::VersionedSymbol::get_symbol(), and get_vsymbol().

VersionedSymbol BinaryLoaderElf::SymbolMapEntry::get_vsymbol ( const VersionedSymbol version) const

Find definition of symbol.

The specified versioned symbol is probably a symbol referenced by a relocation. This method will scan the list of definitions in this SymbolEntryMap and return the first (only) symbol that has the same name as the supplied symbol's needed version.

SgAsmElfSymbolSection* BinaryLoaderElf::SymbolMapEntry::get_section ( ) const
inline

Returns the section where the base version symbol was defined.

Definition at line 171 of file BinaryLoaderElf.h.

References BinaryLoaderElf::VersionedSymbol::get_section(), and get_vsymbol().

void BinaryLoaderElf::SymbolMapEntry::addVersion ( const VersionedSymbol vsymbol)

Add an additional versioned symbol to this entry.

An entry can have only one base definition and an assertion will if an attempt is made to add a second base definition.

void BinaryLoaderElf::SymbolMapEntry::merge ( const SymbolMapEntry )

Merge the versions from the specified entry into this entry.

void BinaryLoaderElf::SymbolMapEntry::dump ( FILE *  ,
const char *  prefix 
) const

Print info about this symbol map entry.

const VersionedSymbol& BinaryLoaderElf::SymbolMapEntry::get_base_version ( ) const
inlineprivate

Definition at line 186 of file BinaryLoaderElf.h.

References p_versions.

Referenced by get_vsymbol().

Member Data Documentation

std::vector<VersionedSymbol> BinaryLoaderElf::SymbolMapEntry::p_versions
private

Definition at line 153 of file BinaryLoaderElf.h.

Referenced by get_base_version().


The documentation for this struct was generated from the following file: