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


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 112 of file ModulesElf.h.

#include <Rose/BinaryAnalysis/Partitioner2/ModulesElf.h>

Inheritance diagram for Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher:
Inheritance graph
Collaboration diagram for Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher:
Collaboration graph

Public Member Functions

 PltEntryMatcher (rose_addr_t gotVa)
virtual bool match (const PartitionerConstPtr &, rose_addr_t anchor)
 Attempt to match an instruction pattern. More...
rose_addr_t gotVa () const
 Address of global offset table. More...
size_t nBytesMatched () const
 Size of the PLT entry in bytes. More...
rose_addr_t pltEntryAlignment () const
 Alignment of PLT entries w.r.t. 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...
- 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 gotVa)

Public Attributes

rose_addr_t gotVa_ = 0
rose_addr_t gotEntryVa_ = 0
size_t gotEntryNBytes_ = 0
rose_addr_t gotEntry_ = 0
size_t nBytesMatched_ = 0
rose_addr_t functionNumber_ = 0
rose_addr_t pltEntryAlignment_ = 1

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 PartitionerConstPtr ,
rose_addr_t  anchor 

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.

rose_addr_t Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher::gotVa ( ) const

Address of global offset table.

Definition at line 131 of file ModulesElf.h.

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

Size of the PLT entry in bytes.

Definition at line 134 of file ModulesElf.h.

rose_addr_t Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher::pltEntryAlignment ( ) const

Alignment of PLT entries w.r.t.

the beginning of the PLT section.

Definition at line 137 of file ModulesElf.h.

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

Address of the corresponding GOT entry.

Definition at line 140 of file ModulesElf.h.

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

Size of the GOT entry in bytes.

Definition at line 143 of file ModulesElf.h.

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

Value stored in the GOT entry.

Definition at line 146 of file ModulesElf.h.

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