LLVM 19.0.0git
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::object::MachOAbstractFixupEntry Class Reference

MachOAbstractFixupEntry is an abstract class representing a fixup in a MH_DYLDLINK file. More...

#include "llvm/Object/MachO.h"

Inheritance diagram for llvm::object::MachOAbstractFixupEntry:
Inheritance graph
[legend]

Public Member Functions

 MachOAbstractFixupEntry (Error *Err, const MachOObjectFile *O)
 
int32_t segmentIndex () const
 
uint64_t segmentOffset () const
 
uint64_t segmentAddress () const
 
StringRef segmentName () const
 
StringRef sectionName () const
 
StringRef typeName () const
 
StringRef symbolName () const
 
uint32_t flags () const
 
int64_t addend () const
 
int ordinal () const
 
uint64_t address () const
 
uint64_t pointerValue () const
 
uint64_t rawValue () const
 
void moveNext ()
 

Protected Member Functions

void moveToFirst ()
 
void moveToEnd ()
 
uint64_t textAddress () const
 

Protected Attributes

ErrorE
 
const MachOObjectFileO
 
uint64_t SegmentOffset = 0
 
int32_t SegmentIndex = -1
 
StringRef SymbolName
 
int32_t Ordinal = 0
 
uint32_t Flags = 0
 
int64_t Addend = 0
 
uint64_t PointerValue = 0
 
uint64_t RawValue = 0
 
bool Done = false
 

Detailed Description

MachOAbstractFixupEntry is an abstract class representing a fixup in a MH_DYLDLINK file.

Fixups generally represent rebases and binds. Binds also subdivide into additional subtypes (weak, lazy, reexport).

The two concrete subclasses of MachOAbstractFixupEntry are:

MachORebaseBindEntry - for dyld opcode-based tables, including threaded- rebase, where rebases are mixed in with other bind opcodes. MachOChainedFixupEntry - for pointer chains embedded in data pages.

Definition at line 322 of file MachO.h.

Constructor & Destructor Documentation

◆ MachOAbstractFixupEntry()

MachOAbstractFixupEntry::MachOAbstractFixupEntry ( Error Err,
const MachOObjectFile O 
)

Member Function Documentation

◆ addend()

int64_t MachOAbstractFixupEntry::addend ( ) const

Definition at line 3297 of file MachOObjectFile.cpp.

References Addend.

◆ address()

uint64_t MachOAbstractFixupEntry::address ( ) const
Returns
the location of this fixup as a VM Address. For the VM Address this fixup is pointing to, use pointerValue().

Definition at line 3291 of file MachOObjectFile.cpp.

References llvm::object::MachOObjectFile::BindRebaseAddress(), O, SegmentIndex, and SegmentOffset.

◆ flags()

uint32_t MachOAbstractFixupEntry::flags ( ) const

Definition at line 3299 of file MachOObjectFile.cpp.

References Flags.

◆ moveNext()

void MachOAbstractFixupEntry::moveNext ( )

Definition at line 3316 of file MachOObjectFile.cpp.

◆ moveToEnd()

void MachOAbstractFixupEntry::moveToEnd ( )
protected

Definition at line 3314 of file MachOObjectFile.cpp.

References Done.

Referenced by llvm::object::MachOChainedFixupEntry::moveToEnd().

◆ moveToFirst()

void MachOAbstractFixupEntry::moveToFirst ( )
protected

◆ ordinal()

int MachOAbstractFixupEntry::ordinal ( ) const

Definition at line 3301 of file MachOObjectFile.cpp.

References Ordinal.

◆ pointerValue()

uint64_t llvm::object::MachOAbstractFixupEntry::pointerValue ( ) const
inline
Returns
the VM Address pointed to by this fixup. Use pointerValue() to compare against other VM Addresses, such as section addresses or segment vmaddrs.

Definition at line 344 of file MachO.h.

References PointerValue.

◆ rawValue()

uint64_t llvm::object::MachOAbstractFixupEntry::rawValue ( ) const
inline
Returns
the raw "on-disk" representation of the fixup. For Threaded rebases and Chained pointers these values are generally encoded into various different pointer formats. This value is exposed in API for tools that want to display and annotate the raw bits.

Definition at line 351 of file MachO.h.

References RawValue.

◆ sectionName()

StringRef MachOAbstractFixupEntry::sectionName ( ) const

◆ segmentAddress()

uint64_t MachOAbstractFixupEntry::segmentAddress ( ) const

◆ segmentIndex()

int32_t MachOAbstractFixupEntry::segmentIndex ( ) const

Definition at line 3273 of file MachOObjectFile.cpp.

References SegmentIndex.

◆ segmentName()

StringRef MachOAbstractFixupEntry::segmentName ( ) const

◆ segmentOffset()

uint64_t MachOAbstractFixupEntry::segmentOffset ( ) const

Definition at line 3275 of file MachOObjectFile.cpp.

References SegmentOffset.

◆ symbolName()

StringRef MachOAbstractFixupEntry::symbolName ( ) const

Definition at line 3295 of file MachOObjectFile.cpp.

References SymbolName.

◆ textAddress()

uint64_t llvm::object::MachOAbstractFixupEntry::textAddress ( ) const
inlineprotected
Returns
the vm address of the start of __TEXT segment.

Definition at line 372 of file MachO.h.

Referenced by llvm::object::MachOChainedFixupEntry::moveNext().

◆ typeName()

StringRef MachOAbstractFixupEntry::typeName ( ) const

Definition at line 3303 of file MachOObjectFile.cpp.

Member Data Documentation

◆ Addend

int64_t llvm::object::MachOAbstractFixupEntry::Addend = 0
protected

Definition at line 363 of file MachO.h.

Referenced by addend(), llvm::object::MachOChainedFixupEntry::moveNext(), and moveToFirst().

◆ Done

bool llvm::object::MachOAbstractFixupEntry::Done = false
protected

◆ E

Error* llvm::object::MachOAbstractFixupEntry::E
protected

◆ Flags

uint32_t llvm::object::MachOAbstractFixupEntry::Flags = 0
protected

Definition at line 362 of file MachO.h.

Referenced by flags(), llvm::object::MachOChainedFixupEntry::moveNext(), and moveToFirst().

◆ O

const MachOObjectFile* llvm::object::MachOAbstractFixupEntry::O
protected

◆ Ordinal

int32_t llvm::object::MachOAbstractFixupEntry::Ordinal = 0
protected

Definition at line 361 of file MachO.h.

Referenced by llvm::object::MachOChainedFixupEntry::moveNext(), moveToFirst(), and ordinal().

◆ PointerValue

uint64_t llvm::object::MachOAbstractFixupEntry::PointerValue = 0
protected

Definition at line 364 of file MachO.h.

Referenced by llvm::object::MachOChainedFixupEntry::moveNext(), and pointerValue().

◆ RawValue

uint64_t llvm::object::MachOAbstractFixupEntry::RawValue = 0
protected

Definition at line 365 of file MachO.h.

Referenced by llvm::object::MachOChainedFixupEntry::moveNext(), and rawValue().

◆ SegmentIndex

int32_t llvm::object::MachOAbstractFixupEntry::SegmentIndex = -1
protected

◆ SegmentOffset

uint64_t llvm::object::MachOAbstractFixupEntry::SegmentOffset = 0
protected

◆ SymbolName

StringRef llvm::object::MachOAbstractFixupEntry::SymbolName
protected

Definition at line 360 of file MachO.h.

Referenced by llvm::object::MachOChainedFixupEntry::moveNext(), and symbolName().


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