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

This class represents a symbol binding operation associated with the LC_DYLD_CHAINED_FIXUPS command. More...

#include <ChainedBindingInfo.hpp>

Inheritance diagram for LIEF::MachO::ChainedBindingInfo:
Collaboration diagram for LIEF::MachO::ChainedBindingInfo:

Public Member Functions

 ChainedBindingInfo ()=delete
 ChainedBindingInfo (DYLD_CHAINED_FORMAT fmt, bool is_weak)
ChainedBindingInfooperator= (ChainedBindingInfo other)
 ChainedBindingInfo (const ChainedBindingInfo &other)
 ChainedBindingInfo (ChainedBindingInfo &&) noexcept
ChainedBindingInfooperator= (ChainedBindingInfo &&) noexcept
void swap (ChainedBindingInfo &other) noexcept
DYLD_CHAINED_FORMAT format () const
 Format of the imports.
DYLD_CHAINED_PTR_FORMAT ptr_format () const
 Format of the pointer.
uint32_t offset () const
 Original offset in the chain of this binding.
void offset (uint32_t offset)
uint64_t address () const override
 Address of the binding.
void address (uint64_t address) override
uint64_t sign_extended_addend () const
TYPES type () const override
 The type of the binding. This type provides the origin of the binding (LC_DYLD_INFO or LC_DYLD_CHAINED_FIXUPS).
 ~ChainedBindingInfo () override
void accept (Visitor &visitor) const override
Public Member Functions inherited from LIEF::MachO::BindingInfo
 BindingInfo ()=default
 BindingInfo (const BindingInfo &other)
BindingInfooperator= (const BindingInfo &other)
 BindingInfo (BindingInfo &&) noexcept=default
BindingInfooperator= (BindingInfo &&) noexcept=default
void swap (BindingInfo &other) noexcept
bool has_segment () const
 Check if a MachO::SegmentCommand is associated with this binding.
const SegmentCommandsegment () const
 The MachO::SegmentCommand associated with the BindingInfo or a nullptr of it is not bind to a SegmentCommand.
SegmentCommandsegment ()
bool has_library () const
 Check if a MachO::DylibCommand is tied with the BindingInfo.
const DylibCommandlibrary () const
 MachO::DylibCommand associated with the BindingInfo or a nullptr if not present.
DylibCommandlibrary ()
bool has_symbol () const
 Check if a MachO::Symbol is associated with the BindingInfo.
const Symbolsymbol () const
 MachO::Symbol associated with the BindingInfo or a nullptr if not present.
Symbolsymbol ()
int32_t library_ordinal () const
void library_ordinal (int32_t ordinal)
int64_t addend () const
 Value added to the segment's virtual address when bound.
void addend (int64_t addend)
bool is_weak_import () const
void set_weak_import (bool val=true)
 ~BindingInfo () override=default
template<class T>
const T * cast () const
template<class T>
T * cast ()
Public Member Functions inherited from LIEF::Object
 Object ()
 Object (const Object &other)
Objectoperator= (const Object &other)
 Object (Object &&other) noexcept=default
Objectoperator= (Object &&other) noexcept=default
template<class T>
output_t< T > as ()
template<class T>
output_const_t< T > as () const
virtual bool operator== (const Object &other) const
virtual bool operator!= (const Object &other) const
virtual ~Object ()

Static Public Member Functions

static bool classof (const BindingInfo *info)

Additional Inherited Members

Public Types inherited from LIEF::MachO::BindingInfo
enum class  TYPES {
  UNKNOWN = 0 , DYLD_INFO , CHAINED , CHAINED_LIST ,
  INDIRECT_SYMBOL
}
Public Types inherited from LIEF::Object
template<class T>
using output_t = add_pointer_t<decay_t<T>>
template<class T>
using output_const_t = add_pointer_t<add_const_t<decay_t<T>>>

Detailed Description

This class represents a symbol binding operation associated with the LC_DYLD_CHAINED_FIXUPS command.

This class does not represent a structure that exists in the Mach-O format specifications but it provides a view on an entry.

See also
: BindingInfo

Constructor & Destructor Documentation

◆ ChainedBindingInfo() [1/4]

LIEF::MachO::ChainedBindingInfo::ChainedBindingInfo ( )
delete

◆ ChainedBindingInfo() [2/4]

LIEF::MachO::ChainedBindingInfo::ChainedBindingInfo ( DYLD_CHAINED_FORMAT fmt,
bool is_weak )
explicit

◆ ChainedBindingInfo() [3/4]

LIEF::MachO::ChainedBindingInfo::ChainedBindingInfo ( const ChainedBindingInfo & other)

References ChainedBindingInfo().

◆ ChainedBindingInfo() [4/4]

LIEF::MachO::ChainedBindingInfo::ChainedBindingInfo ( ChainedBindingInfo && )
noexcept

References ChainedBindingInfo().

◆ ~ChainedBindingInfo()

LIEF::MachO::ChainedBindingInfo::~ChainedBindingInfo ( )
override

Member Function Documentation

◆ accept()

void LIEF::MachO::ChainedBindingInfo::accept ( Visitor & visitor) const
overridevirtual

Reimplemented from LIEF::MachO::BindingInfo.

References LIEF_API.

◆ address() [1/2]

uint64_t LIEF::MachO::ChainedBindingInfo::address ( ) const
inlineoverridevirtual

Address of the binding.

Reimplemented from LIEF::MachO::BindingInfo.

Referenced by address().

◆ address() [2/2]

void LIEF::MachO::ChainedBindingInfo::address ( uint64_t address)
inlineoverridevirtual

Reimplemented from LIEF::MachO::BindingInfo.

References address().

◆ classof()

bool LIEF::MachO::ChainedBindingInfo::classof ( const BindingInfo * info)
inlinestatic

◆ format()

DYLD_CHAINED_FORMAT LIEF::MachO::ChainedBindingInfo::format ( ) const
inline

Format of the imports.

References format().

Referenced by format().

◆ offset() [1/2]

uint32_t LIEF::MachO::ChainedBindingInfo::offset ( ) const
inline

Original offset in the chain of this binding.

Referenced by offset().

◆ offset() [2/2]

void LIEF::MachO::ChainedBindingInfo::offset ( uint32_t offset)
inline

References offset().

◆ operator=() [1/2]

ChainedBindingInfo & LIEF::MachO::ChainedBindingInfo::operator= ( ChainedBindingInfo && )
noexcept

References ChainedBindingInfo().

◆ operator=() [2/2]

ChainedBindingInfo & LIEF::MachO::ChainedBindingInfo::operator= ( ChainedBindingInfo other)

References ChainedBindingInfo().

◆ ptr_format()

DYLD_CHAINED_PTR_FORMAT LIEF::MachO::ChainedBindingInfo::ptr_format ( ) const
inline

Format of the pointer.

◆ sign_extended_addend()

uint64_t LIEF::MachO::ChainedBindingInfo::sign_extended_addend ( ) const

◆ swap()

void LIEF::MachO::ChainedBindingInfo::swap ( ChainedBindingInfo & other)
noexcept

References ChainedBindingInfo(), and swap().

Referenced by swap().

◆ type()

TYPES LIEF::MachO::ChainedBindingInfo::type ( ) const
inlineoverridevirtual

The type of the binding. This type provides the origin of the binding (LC_DYLD_INFO or LC_DYLD_CHAINED_FIXUPS).

Implements LIEF::MachO::BindingInfo.

References LIEF::MachO::BindingInfo::CHAINED.

Member Data Documentation

◆ arm64_auth_bind24_

details::dyld_chained_ptr_arm64e_auth_bind24* LIEF::MachO::ChainedBindingInfo::arm64_auth_bind24_

◆ arm64_auth_bind_

details::dyld_chained_ptr_arm64e_auth_bind* LIEF::MachO::ChainedBindingInfo::arm64_auth_bind_

◆ arm64_bind24_

details::dyld_chained_ptr_arm64e_bind24* LIEF::MachO::ChainedBindingInfo::arm64_bind24_

◆ arm64_bind_

details::dyld_chained_ptr_arm64e_bind* LIEF::MachO::ChainedBindingInfo::arm64_bind_ = nullptr

◆ p32_bind_

details::dyld_chained_ptr_32_bind* LIEF::MachO::ChainedBindingInfo::p32_bind_

◆ p64_bind_

details::dyld_chained_ptr_64_bind* LIEF::MachO::ChainedBindingInfo::p64_bind_

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