pub enum Section<'a> {
Generic(Generic<'a>),
ThreadLocalVariables(ThreadLocalVariables<'a>),
}Expand description
Enum that wraps all the Mach-O section types, dispatching to the appropriate concrete type when extra semantics are available.
Variants§
Generic(Generic<'a>)
A section without additional specialization.
ThreadLocalVariables(ThreadLocalVariables<'a>)
A section whose type is Type::THREAD_LOCAL_VARIABLES, providing access
to thread-local variable descriptors.
Trait Implementations§
§impl MachOSection for Section<'_>
impl MachOSection for Section<'_>
§fn segment_name(&self) -> String
fn segment_name(&self) -> String
Name of the segment that owns this section
§fn relocation_offset(&self) -> u32
fn relocation_offset(&self) -> u32
Offset of the relocation table. This value should be 0
for executable and libraries as the relocations are managed by
crate::macho::Relocation::Dyld or crate::macho::Relocation::Fixup Read more§fn numberof_relocations(&self) -> u32
fn numberof_relocations(&self) -> u32
Number of relocations associated with this section
fn raw_flags(&self) -> u32
§fn section_type(&self) -> Type
fn section_type(&self) -> Type
Type of the section. This value can help to determine the purpose of the section
§fn reserved1(&self) -> u32
fn reserved1(&self) -> u32
According to the official
loader.h file, this value is reserved
for offset or index§fn reserved2(&self) -> u32
fn reserved2(&self) -> u32
According to the official
loader.h file, this value is reserved
for count or sizeof§fn reserved3(&self) -> u32
fn reserved3(&self) -> u32
This value is only present for 64 bits Mach-O files. In that case,
the value is reserved.
§fn relocations(&self) -> Relocations<'_> ⓘ
fn relocations(&self) -> Relocations<'_> ⓘ
Iterator over the
crate::macho::Relocation associated with this section§impl Section for Section<'_>
impl Section for Section<'_>
§fn virtual_address(&self) -> u64
fn virtual_address(&self) -> u64
Address of the section in memory
§fn set_content(&mut self, data: &[u8])
fn set_content(&mut self, data: &[u8])
Change section content
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Section<'a>
impl<'a> !Send for Section<'a>
impl<'a> !Sync for Section<'a>
impl<'a> Unpin for Section<'a>
impl<'a> !UnwindSafe for Section<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more