pub struct Segment64 {
pub cmd_index: usize,
pub segname: [u8; 16],
pub vmaddr: u64,
pub vmsize: u64,
pub fileoff: u64,
pub filesize: u64,
pub maxprot: u32,
pub initprot: u32,
pub nsects: u32,
pub flags: u32,
pub sections: Vec<Section64>,
}Expand description
A LC_SEGMENT_64 descriptor, structurally decoded enough to
drive segment-data extraction and the decompile path’s
section iteration. The raw bytes still round-trip through
the matching LoadCommand::body.
Fields§
§cmd_index: usizeIndex of this segment’s LC_SEGMENT_64 entry in
MachoFile::commands.
segname: [u8; 16]Null-padded segment name (__TEXT, __DATA_CONST,
__LINKEDIT, …). Up to 16 bytes.
vmaddr: u64§vmsize: u64§fileoff: u64§filesize: u64§maxprot: u32§initprot: u32§nsects: u32§flags: u32§sections: Vec<Section64>Implementations§
Source§impl Segment64
impl Segment64
Sourcepub fn write_to_body(&self) -> Vec<u8> ⓘ
pub fn write_to_body(&self) -> Vec<u8> ⓘ
Serialize this segment back to the bytes that follow the
8-byte cmd/cmdsize prefix of a LC_SEGMENT_64 load
command — i.e. the body that round-trips through
LoadCommand::body. Output length is
64 + 80 * sections.len().
Trait Implementations§
impl Eq for Segment64
impl StructuralPartialEq for Segment64
Auto Trait Implementations§
impl Freeze for Segment64
impl RefUnwindSafe for Segment64
impl Send for Segment64
impl Sync for Segment64
impl Unpin for Segment64
impl UnsafeUnpin for Segment64
impl UnwindSafe for Segment64
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