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
sourceimpl<E: Clone + Endian> Clone for ProgramHeader32<E>
impl<E: Clone + Endian> Clone for ProgramHeader32<E>
sourcefn clone(&self) -> ProgramHeader32<E>
fn clone(&self) -> ProgramHeader32<E>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<E: Debug + Endian> Debug for ProgramHeader32<E>
impl<E: Debug + Endian> Debug for ProgramHeader32<E>
sourceimpl<Endian: Endian> ProgramHeader for ProgramHeader32<Endian>
impl<Endian: Endian> ProgramHeader for ProgramHeader32<Endian>
type Word = u32
type Endian = Endian
type Elf = FileHeader32<Endian>
fn p_type(&self, endian: Self::Endian) -> u32
fn p_flags(&self, endian: Self::Endian) -> u32
fn p_offset(&self, endian: Self::Endian) -> Self::Word
fn p_vaddr(&self, endian: Self::Endian) -> Self::Word
fn p_paddr(&self, endian: Self::Endian) -> Self::Word
fn p_filesz(&self, endian: Self::Endian) -> Self::Word
fn p_memsz(&self, endian: Self::Endian) -> Self::Word
fn p_align(&self, endian: Self::Endian) -> Self::Word
sourcefn file_range(&self, endian: Self::Endian) -> (u64, u64)
fn file_range(&self, endian: Self::Endian) -> (u64, u64)
Return the offset and size of the segment in the file.
sourcefn data<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<&'data [u8], ()>
fn data<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<&'data [u8], ()>
Return the segment data. Read more
sourcefn data_as_array<'data, T: Pod, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<&'data [T], ()>
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
sourcefn data_range<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R,
address: u64,
size: u64
) -> Result<Option<&'data [u8]>, ()>
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
impl<E: Copy + Endian> Copy for ProgramHeader32<E>
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more