LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
LIEF::MachO::FunctionVariants::RuntimeTable Class Reference

Represents a runtime table of function variants sharing a common namespace (referred to internally as FunctionVariantsRuntimeTable in dyld). More...

#include <FunctionVariants.hpp>

Public Types

enum class  KIND : uint32_t {
  UNKNOWN = 0 , PER_PROCESS = 1 , SYSTEM_WIDE = 2 , ARM64 = 3 ,
  X86_64 = 4
}
 Enumeration describing the namespace or category of a function variant. More...
using entries_t = std::vector<RuntimeTableEntry>
using it_entries = ref_iterator<entries_t&>
 Iterator that output RuntimeTableEntry&.
using it_const_entries = const_ref_iterator<const entries_t&>
 Iterator that output const RuntimeTableEntry&.

Public Member Functions

 RuntimeTable ()=default
 RuntimeTable (KIND kind, uint32_t offset)
 RuntimeTable (const RuntimeTable &)=default
RuntimeTableoperator= (const RuntimeTable &)=default
 RuntimeTable (RuntimeTable &&) noexcept=default
RuntimeTableoperator= (RuntimeTable &&) noexcept=default
 ~RuntimeTable ()=default
KIND kind () const
 Kind of this runtime table.
uint32_t offset () const
 Original offset in the payload.
it_entries entries ()
 Iterator over the different RuntimeTableEntry entries.
it_const_entries entries () const
void add (RuntimeTableEntry entry)
std::string to_string () const

Detailed Description

Represents a runtime table of function variants sharing a common namespace (referred to internally as FunctionVariantsRuntimeTable in dyld).

Each table holds multiple RuntimeTableEntry instances that map to function implementations optimized for a given KIND.

Member Typedef Documentation

◆ entries_t

◆ it_const_entries

◆ it_entries

Member Enumeration Documentation

◆ KIND

Enumeration describing the namespace or category of a function variant.

Each FunctionVariants::RuntimeTable is associated with one KIND, which indicates the domain or context under which its variant entries should be considered valid or applicable.

These categories map to the runtime dispatch logic used by dyld when selecting the optimal function variant.

Enumerator
UNKNOWN 

Fallback/default kind when the category is not recognized.

PER_PROCESS 

Variants that apply on a per-process basis.

SYSTEM_WIDE 

Variants that are selected based on system-wide capabilities or configurations.

ARM64 

Variants optimized for the ARM64 architecture.

X86_64 

Variants optimized for the x86-64 architecture.

Constructor & Destructor Documentation

◆ RuntimeTable() [1/4]

LIEF::MachO::FunctionVariants::RuntimeTable::RuntimeTable ( )
default

◆ RuntimeTable() [2/4]

LIEF::MachO::FunctionVariants::RuntimeTable::RuntimeTable ( KIND kind,
uint32_t offset )
inline

References kind(), and offset().

◆ RuntimeTable() [3/4]

LIEF::MachO::FunctionVariants::RuntimeTable::RuntimeTable ( const RuntimeTable & )
default

References RuntimeTable().

◆ RuntimeTable() [4/4]

LIEF::MachO::FunctionVariants::RuntimeTable::RuntimeTable ( RuntimeTable && )
defaultnoexcept

References RuntimeTable().

◆ ~RuntimeTable()

LIEF::MachO::FunctionVariants::RuntimeTable::~RuntimeTable ( )
default

References RuntimeTable().

Member Function Documentation

◆ add()

void LIEF::MachO::FunctionVariants::RuntimeTable::add ( RuntimeTableEntry entry)
inline

◆ entries() [1/2]

it_entries LIEF::MachO::FunctionVariants::RuntimeTable::entries ( )
inline

Iterator over the different RuntimeTableEntry entries.

◆ entries() [2/2]

it_const_entries LIEF::MachO::FunctionVariants::RuntimeTable::entries ( ) const
inline

◆ kind()

KIND LIEF::MachO::FunctionVariants::RuntimeTable::kind ( ) const
inline

Kind of this runtime table.

References kind().

Referenced by kind(), and RuntimeTable().

◆ offset()

uint32_t LIEF::MachO::FunctionVariants::RuntimeTable::offset ( ) const
inline

Original offset in the payload.

Referenced by RuntimeTable().

◆ operator=() [1/2]

RuntimeTable & LIEF::MachO::FunctionVariants::RuntimeTable::operator= ( const RuntimeTable & )
default

References RuntimeTable().

◆ operator=() [2/2]

RuntimeTable & LIEF::MachO::FunctionVariants::RuntimeTable::operator= ( RuntimeTable && )
defaultnoexcept

References RuntimeTable().

◆ to_string()

std::string LIEF::MachO::FunctionVariants::RuntimeTable::to_string ( ) const

References LIEF_API.

Referenced by operator<<.


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