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

#include <Rose/BinaryAnalysis/Partitioner2/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 gotVa)
 
virtual bool match (const PartitionerConstPtr &, rose_addr_t anchor)
 Attempt to match an instruction pattern.
 
rose_addr_t gotVa () const
 Address of global offset table.
 
size_t nBytesMatched () const
 Size of the PLT entry in bytes.
 
rose_addr_t pltEntryAlignment () const
 Alignment of PLT entries w.r.t.
 
rose_addr_t gotEntryVa () const
 Address of the corresponding GOT entry.
 
size_t gotEntryNBytes () const
 Size of the GOT entry in bytes.
 
rose_addr_t gotEntry () const
 Value stored in the GOT entry.
 
- Public Member Functions inherited from Sawyer::SharedObject
 SharedObject ()
 Default constructor.
 
 SharedObject (const SharedObject &)
 Copy constructor.
 
virtual ~SharedObject ()
 Virtual destructor.
 
SharedObjectoperator= (const SharedObject &)
 Assignment.
 

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.
 

Constructor & Destructor Documentation

◆ PltEntryMatcher()

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

Definition at line 123 of file ModulesElf.h.

Member Function Documentation

◆ instance()

static Ptr Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher::instance ( rose_addr_t  gotVa)
inlinestatic

Definition at line 125 of file ModulesElf.h.

◆ match()

virtual bool Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher::match ( const PartitionerConstPtr ,
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.

◆ gotVa()

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

Address of global offset table.

Definition at line 131 of file ModulesElf.h.

◆ nBytesMatched()

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

Size of the PLT entry in bytes.

Definition at line 134 of file ModulesElf.h.

◆ pltEntryAlignment()

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

Alignment of PLT entries w.r.t.

the beginning of the PLT section.

Definition at line 137 of file ModulesElf.h.

◆ gotEntryVa()

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

Address of the corresponding GOT entry.

Definition at line 140 of file ModulesElf.h.

◆ gotEntryNBytes()

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

Size of the GOT entry in bytes.

Definition at line 143 of file ModulesElf.h.

◆ gotEntry()

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

Value stored in the GOT entry.

Definition at line 146 of file ModulesElf.h.

Member Data Documentation

◆ gotVa_

rose_addr_t Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher::gotVa_ = 0

Definition at line 114 of file ModulesElf.h.

◆ gotEntryVa_

rose_addr_t Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher::gotEntryVa_ = 0

Definition at line 115 of file ModulesElf.h.

◆ gotEntryNBytes_

size_t Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher::gotEntryNBytes_ = 0

Definition at line 116 of file ModulesElf.h.

◆ gotEntry_

rose_addr_t Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher::gotEntry_ = 0

Definition at line 117 of file ModulesElf.h.

◆ nBytesMatched_

size_t Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher::nBytesMatched_ = 0

Definition at line 118 of file ModulesElf.h.

◆ functionNumber_

rose_addr_t Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher::functionNumber_ = 0

Definition at line 119 of file ModulesElf.h.

◆ pltEntryAlignment_

rose_addr_t Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher::pltEntryAlignment_ = 1

Definition at line 120 of file ModulesElf.h.


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