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

#include <BinaryLoaderElf.h>

Public Member Functions

 SymverResolver (SgAsmGenericHeader *header)
 
VersionedSymbol get_versioned_symbol (SgAsmElfSymbol *symbol) const
 Returns the VersionedSymbol corresponding to the specified symbol. More...
 
void dump (FILE *, const char *prefix, ssize_t idx) const
 Print some info about the resolver. More...
 

Private Types

typedef std::map
< SgAsmElfSymbol
*, VersionedSymbol * > 
VersionedSymbolMap
 
typedef std::map< uint16_t,
SgAsmElfSymverDefinedEntry * > 
SymbolVersionDefinitionMap
 
typedef std::map< uint16_t,
SgAsmElfSymverNeededAux * > 
SymbolVersionNeededMap
 

Private Member Functions

void ctor (SgAsmGenericHeader *)
 Helper for constructors. More...
 
void makeSymbolVersionDefMap (SgAsmElfSymverDefinedSection *)
 Initialize the p_symbolVersionDefMap from the ELF Symbol Version Definition Table. More...
 
void makeSymbolVersionNeedMap (SgAsmElfSymverNeededSection *)
 Initialize the p_symbolVersionNeedMap from the ELF Symbol Version Requirements Table auxiliary information. More...
 
void makeVersionedSymbolMap (SgAsmElfSymbolSection *, SgAsmElfSymverSection *)
 Create a map from from each SgAsmElfSymbol* to a VersionedSymbol. More...
 

Private Attributes

SymbolVersionDefinitionMap p_symbolVersionDefMap
 Map from each ELF Symbol Version Definition Table entry's get_index() to the entry itself. More...
 
SymbolVersionNeededMap p_symbolVersionNeedMap
 Map from each auxiliary's get_other() to the auxiliary itself. More...
 
VersionedSymbolMap p_versionedSymbolMap
 Map from an SgAsmElfSymbol to a VersionedSymbol. More...
 

Detailed Description

Definition at line 207 of file BinaryLoaderElf.h.

Member Typedef Documentation

Definition at line 239 of file BinaryLoaderElf.h.

Definition at line 240 of file BinaryLoaderElf.h.

Constructor & Destructor Documentation

BinaryLoaderElf::SymverResolver::SymverResolver ( SgAsmGenericHeader header)
inline

Definition at line 209 of file BinaryLoaderElf.h.

References ctor().

Member Function Documentation

VersionedSymbol BinaryLoaderElf::SymverResolver::get_versioned_symbol ( SgAsmElfSymbol symbol) const

Returns the VersionedSymbol corresponding to the specified symbol.

The specified symbol must be a member of the versioned symbol map (or an assertion fails).

void BinaryLoaderElf::SymverResolver::dump ( FILE *  ,
const char *  prefix,
ssize_t  idx 
) const

Print some info about the resolver.

void BinaryLoaderElf::SymverResolver::ctor ( SgAsmGenericHeader )
private

Helper for constructors.

Referenced by SymverResolver().

void BinaryLoaderElf::SymverResolver::makeSymbolVersionDefMap ( SgAsmElfSymverDefinedSection )
private

Initialize the p_symbolVersionDefMap from the ELF Symbol Version Definition Table.

This mapping is from each entry's get_index() to the entry itself.

void BinaryLoaderElf::SymverResolver::makeSymbolVersionNeedMap ( SgAsmElfSymverNeededSection )
private

Initialize the p_symbolVersionNeedMap from the ELF Symbol Version Requirements Table auxiliary information.

The mapping is from each auxiliary's get_other() to the auxiliary. The table entries are available indirectly since an SgAsmElfSymverNeededEntry is the parent of each SgAsmElfSymverNeededAux.

void BinaryLoaderElf::SymverResolver::makeVersionedSymbolMap ( SgAsmElfSymbolSection ,
SgAsmElfSymverSection  
)
private

Create a map from from each SgAsmElfSymbol* to a VersionedSymbol.

The p_symbolVersionDefMap must be initialized before calling this. The SgAsmElfSymverSection argument may be null, in which case VersionedSymbols are basically just a wrapper to their SgAsmElfSymbol.

Member Data Documentation

SymbolVersionDefinitionMap BinaryLoaderElf::SymverResolver::p_symbolVersionDefMap
private

Map from each ELF Symbol Version Definition Table entry's get_index() to the entry itself.

Definition at line 243 of file BinaryLoaderElf.h.

SymbolVersionNeededMap BinaryLoaderElf::SymverResolver::p_symbolVersionNeedMap
private

Map from each auxiliary's get_other() to the auxiliary itself.

The auxiliaries come from the GNU Symbol Version Requirements Table, each entry of which points to a list of auxiliaries. The parent of each auxiliary is the table entry that contained the auxiliary, thus this mapping also maps get_other() to GNU Symbol Version Requirements Table entries.

Definition at line 249 of file BinaryLoaderElf.h.

VersionedSymbolMap BinaryLoaderElf::SymverResolver::p_versionedSymbolMap
private

Map from an SgAsmElfSymbol to a VersionedSymbol.

Definition at line 252 of file BinaryLoaderElf.h.


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