Struct object::elf::ProgramHeader64[][src]

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

Program segment header.

Fields

p_type: U32<E>

Segment type. One of the PT_* constants.

p_flags: U32<E>

Segment flags. A combination of the PF_* constants.

p_offset: U64<E>

Segment file offset.

p_vaddr: U64<E>

Segment virtual address.

p_paddr: U64<E>

Segment physical address.

p_filesz: U64<E>

Segment size in the file.

p_memsz: U64<E>

Segment size in memory.

p_align: U64<E>

Segment alignment.

Trait Implementations

impl<E: Clone + Endian> Clone for ProgramHeader64<E>[src]

fn clone(&self) -> ProgramHeader64<E>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<E: Debug + Endian> Debug for ProgramHeader64<E>[src]

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

Formats the value using the given formatter. Read more

impl<Endian: Endian> ProgramHeader for ProgramHeader64<Endian>[src]

type Word = u64

type Endian = Endian

type Elf = FileHeader64<Endian>

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

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

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

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

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

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

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

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

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

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

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

Return the segment data. Read more

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

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

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

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

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

Return entries in a dynamic segment. Read more

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

Return a note iterator for the segment data. Read more

impl<E: Copy + Endian> Copy for ProgramHeader64<E>[src]

impl<E: Endian> Pod for ProgramHeader64<E>[src]

Auto Trait Implementations

impl<E> RefUnwindSafe for ProgramHeader64<E> where
    E: RefUnwindSafe

impl<E> Send for ProgramHeader64<E> where
    E: Send

impl<E> Sync for ProgramHeader64<E> where
    E: Sync

impl<E> Unpin for ProgramHeader64<E> where
    E: Unpin

impl<E> UnwindSafe for ProgramHeader64<E> where
    E: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.