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>
impl<E: Clone + Endian> Clone for ProgramHeader32<E>
source§fn clone(&self) -> ProgramHeader32<E>
fn clone(&self) -> ProgramHeader32<E>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<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
source§fn 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.
source§fn 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
source§fn 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
source§fn 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
source§fn dynamic<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R,
) -> Result<Option<&'data [<Self::Elf as FileHeader>::Dyn]>>
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
impl<E: Copy + Endian> Copy for ProgramHeader32<E>
impl<E: Endian> Pod for ProgramHeader32<E>
Auto Trait Implementations§
impl<E> Freeze for ProgramHeader32<E>
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> 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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)