pub struct DynamicSymbolCommand<'a> { /* private fields */ }
Expand description

Structure that represents the LC_DYSYMTAB command.

This command completes the LC_SYMTAB to provide a better granularity over the symbols layout.

Implementations§

§

impl DynamicSymbolCommand<'_>

pub fn idx_local_symbol(&self) -> u32

Index of the first symbol in the group of local symbols.

pub fn nb_local_symbols(&self) -> u32

Number of symbols in the group of local symbols.

pub fn idx_external_define_symbol(&self) -> u32

Index of the first symbol in the group of defined external symbols.

pub fn nb_external_define_symbols(&self) -> u32

Number of symbols in the group of defined external symbols.

pub fn idx_undefined_symbol(&self) -> u32

Index of the first symbol in the group of undefined external symbols.

pub fn nb_undefined_symbols(&self) -> u32

Number of symbols in the group of undefined external symbols.

pub fn toc_offset(&self) -> u32

Byte offset from the start of the file to the table of contents data

Table of content is used by legacy Mach-O loader and this field should be set to 0

pub fn nb_toc(&self) -> u32

Number of entries in the table of contents.

Should be set to 0 on recent Mach-O

pub fn module_table_offset(&self) -> u32

Byte offset from the start of the file to the module table data.

This field seems unused by recent Mach-O loader and should be set to 0

pub fn nb_module_table(&self) -> u32

Number of entries in the module table.

This field seems unused by recent Mach-O loader and should be set to 0

pub fn external_reference_symbol_offset(&self) -> u32

Byte offset from the start of the file to the external reference table data.

This field seems unused by recent Mach-O loader and should be set to 0

pub fn nb_external_reference_symbols(&self) -> u32

Number of entries in the external reference table

This field seems unused by recent Mach-O loader and should be set to 0

pub fn indirect_symbol_offset(&self) -> u32

Byte offset from the start of the file to the indirect symbol table data.

Indirect symbol table is used by the loader to speed-up symbol resolution during the lazy binding process

References:

  • dyld-519.2.1/src/ImageLoaderMachOCompressed.cpp
  • dyld-519.2.1/src/ImageLoaderMachOClassic.cpp

pub fn nb_indirect_symbols(&self) -> u32

Number of entries in the indirect symbol table.

pub fn external_relocation_offset(&self) -> u32

Byte offset from the start of the file to the external relocation table data.

This field seems unused by recent Mach-O loader and should be set to 0

pub fn nb_external_relocations(&self) -> u32

Number of entries in the external relocation table.

This field seems unused by recent Mach-O loader and should be set to 0

pub fn local_relocation_offset(&self) -> u32

Byte offset from the start of the file to the local relocation table data.

This field seems unused by recent Mach-O loader and should be set to 0

pub fn nb_local_relocations(&self) -> u32

Number of entries in the local relocation table.

This field seems unused by recent Mach-O loader and should be set to 0

pub fn indirect_symbols(&self) -> IndirectSymbols<'_>

Iterator over the indirect symbols indexed by this command

Trait Implementations§

§

impl Command for DynamicSymbolCommand<'_>

§

fn size(&self) -> u32

Size of the command (should be greather than sizeof(load_command))
§

fn offset(&self) -> u64

Offset of the command within the Load Command Table
§

fn command_type(&self) -> LoadCommandTypes

The command’s type
§

fn data(&self) -> &[u8]

The raw command as a slice of bytes
§

impl Debug for DynamicSymbolCommand<'_>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.