Struct SegmentCommand32

struct SegmentCommand32<E: Endian> { ... }

32-bit segment load command.

The segment load command indicates that a part of this file is to be mapped into the task's address space. The size of this segment in memory, vmsize, maybe equal to or larger than the amount to map from this file, filesize. The file is mapped starting at fileoff to the beginning of the segment in memory, vmaddr. The rest of the memory of the segment, if any, is allocated zero fill on demand. The segment's maximum virtual memory protection and initial virtual memory protection are specified by the maxprot and initprot fields. If the segment has sections then the Section32 structures directly follow the segment command and their size is reflected in cmdsize.

Fields

cmd: crate::endian::U32<E>

LC_SEGMENT

cmdsize: crate::endian::U32<E>

includes sizeof section structs

segname: [u8; 16]

segment name

vmaddr: crate::endian::U32<E>

memory address of this segment

vmsize: crate::endian::U32<E>

memory size of this segment

fileoff: crate::endian::U32<E>

file offset of this segment

filesize: crate::endian::U32<E>

amount to map from the file

maxprot: crate::endian::U32<E>

maximum VM protection

initprot: crate::endian::U32<E>

initial VM protection

nsects: crate::endian::U32<E>

number of sections in segment

flags: crate::endian::U32<E>

flags

Implementations

impl<E> Freeze for SegmentCommand32<E>

impl<E> RefUnwindSafe for SegmentCommand32<E>

impl<E> Send for SegmentCommand32<E>

impl<E> Sync for SegmentCommand32<E>

impl<E> Unpin for SegmentCommand32<E>

impl<E> UnwindSafe for SegmentCommand32<E>

impl<E: $crate::clone::Clone + Endian> Clone for SegmentCommand32<E>

fn clone(self: &Self) -> SegmentCommand32<E>

impl<E: $crate::fmt::Debug + Endian> Debug for SegmentCommand32<E>

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

impl<E: $crate::marker::Copy + Endian> Copy for SegmentCommand32<E>

impl<E: Endian> Pod for SegmentCommand32<E>

impl<Endian: endian::Endian> Segment for macho::SegmentCommand32<Endian>

fn from_command(command: LoadCommandData<'_, <Self as >::Endian>) -> Result<Option<(&Self, &[u8])>>
fn cmd(self: &Self, endian: <Self as >::Endian) -> u32
fn cmdsize(self: &Self, endian: <Self as >::Endian) -> u32
fn segname(self: &Self) -> &[u8; 16]
fn vmaddr(self: &Self, endian: <Self as >::Endian) -> <Self as >::Word
fn vmsize(self: &Self, endian: <Self as >::Endian) -> <Self as >::Word
fn fileoff(self: &Self, endian: <Self as >::Endian) -> <Self as >::Word
fn filesize(self: &Self, endian: <Self as >::Endian) -> <Self as >::Word
fn maxprot(self: &Self, endian: <Self as >::Endian) -> u32
fn initprot(self: &Self, endian: <Self as >::Endian) -> u32
fn nsects(self: &Self, endian: <Self as >::Endian) -> u32
fn flags(self: &Self, endian: <Self as >::Endian) -> u32

impl<T> Any for SegmentCommand32<E>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for SegmentCommand32<E>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for SegmentCommand32<E>

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

impl<T> CloneToUninit for SegmentCommand32<E>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for SegmentCommand32<E>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for SegmentCommand32<E>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for SegmentCommand32<E>

fn into(self: Self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom for SegmentCommand32<E>

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

impl<T, U> TryInto for SegmentCommand32<E>

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