Struct object::elf::ProgramHeader32

source ·
#[repr(C)]
pub struct ProgramHeader32<E: Endian> { pub p_type: U32<E>, pub p_offset: U32<E>, pub p_vaddr: U32<E>, pub p_paddr: U32<E>, pub p_filesz: U32<E>, pub p_memsz: U32<E>, pub p_flags: U32<E>, pub p_align: U32<E>, }
Expand description

Program segment header.

Fields§

§p_type: U32<E>

Segment type. One of the PT_* constants.

§p_offset: U32<E>

Segment file offset.

§p_vaddr: U32<E>

Segment virtual address.

§p_paddr: U32<E>

Segment physical address.

§p_filesz: U32<E>

Segment size in the file.

§p_memsz: U32<E>

Segment size in memory.

§p_flags: U32<E>

Segment flags. A combination of the PF_* constants.

§p_align: U32<E>

Segment alignment.

Trait Implementations§

source§

impl<E: Clone + Endian> Clone for ProgramHeader32<E>

source§

fn clone(&self) -> ProgramHeader32<E>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<E: Debug + Endian> Debug for ProgramHeader32<E>

source§

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

Formats the value using the given formatter. Read more
source§

impl<Endian: Endian> ProgramHeader for ProgramHeader32<Endian>

§

type Word = u32

§

type Endian = Endian

§

type Elf = FileHeader32<Endian>

source§

fn p_type(&self, endian: Self::Endian) -> u32

source§

fn p_flags(&self, endian: Self::Endian) -> u32

source§

fn p_offset(&self, endian: Self::Endian) -> Self::Word

source§

fn p_vaddr(&self, endian: Self::Endian) -> Self::Word

source§

fn p_paddr(&self, endian: Self::Endian) -> Self::Word

source§

fn p_filesz(&self, endian: Self::Endian) -> Self::Word

source§

fn p_memsz(&self, endian: Self::Endian) -> Self::Word

source§

fn p_align(&self, endian: Self::Endian) -> Self::Word

source§

fn file_range(&self, endian: Self::Endian) -> (u64, u64)

Return the offset and size of the segment in the file.
source§

fn data<'data, R: ReadRef<'data>>( &self, endian: Self::Endian, data: R ) -> Result<&'data [u8], ()>

Return the segment data. Read more
source§

fn data_as_array<'data, T: Pod, R: ReadRef<'data>>( &self, endian: Self::Endian, data: R ) -> Result<&'data [T], ()>

Return the segment data as a slice of the given type. Read more
source§

fn data_range<'data, R: ReadRef<'data>>( &self, endian: Self::Endian, data: R, address: u64, size: u64 ) -> Result<Option<&'data [u8]>, ()>

Return the segment data in the given virtual address range Read more
source§

fn dynamic<'data, R: ReadRef<'data>>( &self, endian: Self::Endian, data: R ) -> Result<Option<&'data [<Self::Elf as FileHeader>::Dyn]>>

Return entries in a dynamic segment. Read more
source§

fn notes<'data, R: ReadRef<'data>>( &self, endian: Self::Endian, data: R ) -> Result<Option<NoteIterator<'data, Self::Elf>>>

Return a note iterator for the segment data. Read more
source§

impl<E: Copy + Endian> Copy for ProgramHeader32<E>

source§

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

Auto Trait Implementations§

§

impl<E> RefUnwindSafe for ProgramHeader32<E>where E: RefUnwindSafe,

§

impl<E> Send for ProgramHeader32<E>where E: Send,

§

impl<E> Sync for ProgramHeader32<E>where E: Sync,

§

impl<E> Unpin for ProgramHeader32<E>where E: Unpin,

§

impl<E> UnwindSafe for ProgramHeader32<E>where E: UnwindSafe,

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> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.