ROSE  0.9.10.114
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher Struct Reference

Description

Matches an ELF PLT entry.

The address through which the PLT entry branches is remembered. This address is typically an RVA which is added to the initial base address.

Definition at line 83 of file ModulesElf.h.

#include <ModulesElf.h>

Inheritance diagram for Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher:
Inheritance graph
[legend]
Collaboration diagram for Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher:
Collaboration graph
[legend]

Public Member Functions

 PltEntryMatcher (rose_addr_t base)
 
virtual bool match (const Partitioner &, rose_addr_t anchor)
 Attempt to match an instruction pattern. More...
 
size_t nBytesMatched () const
 Size of the PLT entry in bytes. More...
 
rose_addr_t gotEntryVa () const
 Address of the corresponding GOT entry. More...
 
size_t gotEntryNBytes () const
 Size of the GOT entry in bytes. More...
 
rose_addr_t gotEntry () const
 Value stored in the GOT entry. More...
 
rose_addr_t memAddress () const
 
- Public Member Functions inherited from Sawyer::SharedObject
 SharedObject ()
 Default constructor. More...
 
 SharedObject (const SharedObject &)
 Copy constructor. More...
 
virtual ~SharedObject ()
 Virtual destructor. More...
 
SharedObjectoperator= (const SharedObject &)
 Assignment. More...
 

Static Public Member Functions

static Ptr instance (rose_addr_t base)
 

Public Attributes

rose_addr_t baseVa_
 
rose_addr_t gotEntryVa_
 
size_t gotEntryNBytes_
 
rose_addr_t gotEntry_
 
size_t nBytesMatched_
 

Additional Inherited Members

- Public Types inherited from Rose::BinaryAnalysis::Partitioner2::InstructionMatcher
typedef Sawyer::SharedPointer< InstructionMatcherPtr
 Shared-ownership pointer to an InstructionMatcher. More...
 

Member Function Documentation

virtual bool Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher::match ( const Partitioner ,
rose_addr_t  anchor 
)
virtual

Attempt to match an instruction pattern.

If the subclass implementation is able to match instructions, bytes, etc. anchored at the anchor address then it should return true, otherwise false. The anchor address will always be valid for the situation (e.g., if the partitioner is trying to match something anchored at an address that is not in the CFG, then the anchor will be such an address; if it is trying to match something that is definitely an instruction then the address will be mapped with execute permission; etc.). This precondition makes writing matchers that match against a single address easier to write, but matchers that match at additional locations must explicitly check those other locations with the same conditions (FIXME[Robb P. Matzke 2014-08-04]: perhaps we should pass those conditions as an argument).

Implements Rose::BinaryAnalysis::Partitioner2::InstructionMatcher.

size_t Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher::nBytesMatched ( ) const
inline

Size of the PLT entry in bytes.

Definition at line 97 of file ModulesElf.h.

rose_addr_t Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher::gotEntryVa ( ) const
inline

Address of the corresponding GOT entry.

Definition at line 100 of file ModulesElf.h.

size_t Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher::gotEntryNBytes ( ) const
inline

Size of the GOT entry in bytes.

Definition at line 103 of file ModulesElf.h.

rose_addr_t Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher::gotEntry ( ) const
inline

Value stored in the GOT entry.

Definition at line 106 of file ModulesElf.h.


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