LLVM 22.0.0git
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:
[legend]

Public Member Functions

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

Protected Member Functions

LLVM_ABI void moveToFirst ()
LLVM_ABI 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 326 of file MachO.h.

Constructor & Destructor Documentation

◆ MachOAbstractFixupEntry()

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

Definition at line 3251 of file MachOObjectFile.cpp.

References E, if(), and O.

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

Member Function Documentation

◆ addend()

int64_t MachOAbstractFixupEntry::addend ( ) const

Definition at line 3296 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 3290 of file MachOObjectFile.cpp.

References O, SegmentIndex, and SegmentOffset.

◆ flags()

uint32_t MachOAbstractFixupEntry::flags ( ) const

Definition at line 3298 of file MachOObjectFile.cpp.

References Flags.

◆ moveNext()

void MachOAbstractFixupEntry::moveNext ( )

Definition at line 3315 of file MachOObjectFile.cpp.

◆ moveToEnd()

void MachOAbstractFixupEntry::moveToEnd ( )
protected

Definition at line 3313 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 3300 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 348 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 355 of file MachO.h.

References RawValue.

◆ sectionName()

StringRef MachOAbstractFixupEntry::sectionName ( ) const

Definition at line 3286 of file MachOObjectFile.cpp.

References O, SegmentIndex, and SegmentOffset.

◆ segmentAddress()

uint64_t MachOAbstractFixupEntry::segmentAddress ( ) const

Definition at line 3278 of file MachOObjectFile.cpp.

References O, and SegmentIndex.

◆ segmentIndex()

int32_t MachOAbstractFixupEntry::segmentIndex ( ) const

Definition at line 3272 of file MachOObjectFile.cpp.

References SegmentIndex.

◆ segmentName()

StringRef MachOAbstractFixupEntry::segmentName ( ) const

Definition at line 3282 of file MachOObjectFile.cpp.

References O, and SegmentIndex.

◆ segmentOffset()

uint64_t MachOAbstractFixupEntry::segmentOffset ( ) const

Definition at line 3274 of file MachOObjectFile.cpp.

References SegmentOffset.

◆ symbolName()

StringRef MachOAbstractFixupEntry::symbolName ( ) const

Definition at line 3294 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 376 of file MachO.h.

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

◆ typeName()

StringRef MachOAbstractFixupEntry::typeName ( ) const

Definition at line 3302 of file MachOObjectFile.cpp.

Member Data Documentation

◆ Addend

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

Definition at line 367 of file MachO.h.

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

◆ Done

◆ E

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

◆ Flags

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

Definition at line 366 of file MachO.h.

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

◆ O

◆ Ordinal

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

Definition at line 365 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 368 of file MachO.h.

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

◆ RawValue

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

Definition at line 369 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 364 of file MachO.h.

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


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