Trait lief::macho::MachOSection
pub trait MachOSection {
Show 13 methods
// Provided methods
fn segment_name(&self) -> String { ... }
fn address(&self) -> u64 { ... }
fn alignment(&self) -> u32 { ... }
fn relocation_offset(&self) -> u32 { ... }
fn numberof_relocations(&self) -> u32 { ... }
fn raw_flags(&self) -> u32 { ... }
fn flags(&self) -> Flags { ... }
fn section_type(&self) -> Type { ... }
fn reserved1(&self) -> u32 { ... }
fn reserved2(&self) -> u32 { ... }
fn reserved3(&self) -> u32 { ... }
fn segment(&self) -> Option<Segment<'_>> { ... }
fn relocations(&self) -> Relocations<'_> ⓘ { ... }
}Expand description
Trait shared by all Mach-O section types in the Section enum.
Provided Methods§
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
On the other hand, for object files (.o) this value should not be 0 (c.f. crate::macho::Relocation::Object)
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