LIEF: Library to Instrument Executable Formats Version 1.0.0
Loading...
Searching...
No Matches
LIEF::MachO::FunctionVariantFixups::Fixup Class Reference

A single relocation associated with a function-variant. It mirrors the FunctionVariantFixups::InternalFixup structure used by dyld and describes a slot that must be fixed up to point to the variant referenced by variant_index(). More...

#include <FunctionVariantFixups.hpp>

Public Member Functions

 Fixup ()=default
 Fixup (uint32_t seg_offset, uint32_t seg_index, uint32_t variant_index, bool pac_auth, bool pac_address, uint8_t pac_key, uint16_t pac_diversity)
 Fixup (const details::function_variant_fixup_t &raw)
 Fixup (const Fixup &)=default
Fixupoperator= (const Fixup &)=default
 Fixup (Fixup &&) noexcept=default
Fixupoperator= (Fixup &&) noexcept=default
 ~Fixup ()=default
uint32_t seg_offset () const
 Offset of the slot to fix up, relative to the segment designated by seg_index().
uint32_t seg_index () const
 Index of the segment that owns the slot to fix up.
uint32_t variant_index () const
 Index of the FunctionVariants runtime table used to resolve the slot.
bool pac_auth () const
 Whether the slot is signed with pointer authentication (arm64e).
bool pac_address () const
 Whether the pointer-authentication signature mixes the storage address (address diversity).
uint8_t pac_key () const
 Pointer-authentication key used to sign the slot.
uint16_t pac_diversity () const
 Pointer-authentication diversity (discriminator) of the slot.
SegmentCommandsegment ()
 SegmentCommand referenced by seg_index() if it could be resolved.
const SegmentCommandsegment () const
void seg_offset (uint32_t value)
void seg_index (uint32_t value)
void variant_index (uint32_t value)
void pac_auth (bool value)
void pac_address (bool value)
void pac_key (uint8_t value)
void pac_diversity (uint16_t value)
void segment (SegmentCommand &seg)
std::string to_string () const

Detailed Description

A single relocation associated with a function-variant. It mirrors the FunctionVariantFixups::InternalFixup structure used by dyld and describes a slot that must be fixed up to point to the variant referenced by variant_index().

Constructor & Destructor Documentation

◆ Fixup() [1/5]

LIEF::MachO::FunctionVariantFixups::Fixup::Fixup ( )
default

◆ Fixup() [2/5]

LIEF::MachO::FunctionVariantFixups::Fixup::Fixup ( uint32_t seg_offset,
uint32_t seg_index,
uint32_t variant_index,
bool pac_auth,
bool pac_address,
uint8_t pac_key,
uint16_t pac_diversity )
inline

◆ Fixup() [3/5]

LIEF::MachO::FunctionVariantFixups::Fixup::Fixup ( const details::function_variant_fixup_t & raw)

◆ Fixup() [4/5]

LIEF::MachO::FunctionVariantFixups::Fixup::Fixup ( const Fixup & )
default

References Fixup().

◆ Fixup() [5/5]

LIEF::MachO::FunctionVariantFixups::Fixup::Fixup ( Fixup && )
defaultnoexcept

References Fixup().

◆ ~Fixup()

LIEF::MachO::FunctionVariantFixups::Fixup::~Fixup ( )
default

References Fixup().

Member Function Documentation

◆ operator=() [1/2]

Fixup & LIEF::MachO::FunctionVariantFixups::Fixup::operator= ( const Fixup & )
default

References Fixup().

◆ operator=() [2/2]

Fixup & LIEF::MachO::FunctionVariantFixups::Fixup::operator= ( Fixup && )
defaultnoexcept

References Fixup().

◆ pac_address() [1/2]

bool LIEF::MachO::FunctionVariantFixups::Fixup::pac_address ( ) const
inline

Whether the pointer-authentication signature mixes the storage address (address diversity).

Referenced by Fixup().

◆ pac_address() [2/2]

void LIEF::MachO::FunctionVariantFixups::Fixup::pac_address ( bool value)
inline

◆ pac_auth() [1/2]

bool LIEF::MachO::FunctionVariantFixups::Fixup::pac_auth ( ) const
inline

Whether the slot is signed with pointer authentication (arm64e).

Referenced by Fixup().

◆ pac_auth() [2/2]

void LIEF::MachO::FunctionVariantFixups::Fixup::pac_auth ( bool value)
inline

◆ pac_diversity() [1/2]

uint16_t LIEF::MachO::FunctionVariantFixups::Fixup::pac_diversity ( ) const
inline

Pointer-authentication diversity (discriminator) of the slot.

Referenced by Fixup().

◆ pac_diversity() [2/2]

void LIEF::MachO::FunctionVariantFixups::Fixup::pac_diversity ( uint16_t value)
inline

◆ pac_key() [1/2]

uint8_t LIEF::MachO::FunctionVariantFixups::Fixup::pac_key ( ) const
inline

Pointer-authentication key used to sign the slot.

Referenced by Fixup().

◆ pac_key() [2/2]

void LIEF::MachO::FunctionVariantFixups::Fixup::pac_key ( uint8_t value)
inline

◆ seg_index() [1/2]

uint32_t LIEF::MachO::FunctionVariantFixups::Fixup::seg_index ( ) const
inline

Index of the segment that owns the slot to fix up.

Referenced by Fixup().

◆ seg_index() [2/2]

void LIEF::MachO::FunctionVariantFixups::Fixup::seg_index ( uint32_t value)
inline

◆ seg_offset() [1/2]

uint32_t LIEF::MachO::FunctionVariantFixups::Fixup::seg_offset ( ) const
inline

Offset of the slot to fix up, relative to the segment designated by seg_index().

References seg_offset().

Referenced by Fixup(), and seg_offset().

◆ seg_offset() [2/2]

void LIEF::MachO::FunctionVariantFixups::Fixup::seg_offset ( uint32_t value)
inline

◆ segment() [1/3]

SegmentCommand * LIEF::MachO::FunctionVariantFixups::Fixup::segment ( )
inline

SegmentCommand referenced by seg_index() if it could be resolved.

◆ segment() [2/3]

const SegmentCommand * LIEF::MachO::FunctionVariantFixups::Fixup::segment ( ) const
inline

◆ segment() [3/3]

void LIEF::MachO::FunctionVariantFixups::Fixup::segment ( SegmentCommand & seg)
inline

◆ to_string()

std::string LIEF::MachO::FunctionVariantFixups::Fixup::to_string ( ) const

Referenced by operator<<.

◆ variant_index() [1/2]

uint32_t LIEF::MachO::FunctionVariantFixups::Fixup::variant_index ( ) const
inline

Index of the FunctionVariants runtime table used to resolve the slot.

Referenced by Fixup().

◆ variant_index() [2/2]

void LIEF::MachO::FunctionVariantFixups::Fixup::variant_index ( uint32_t value)
inline

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