Struct object::elf::ProgramHeader64
source · #[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§
source§impl<E: Clone + Endian> Clone for ProgramHeader64<E>
impl<E: Clone + Endian> Clone for ProgramHeader64<E>
source§fn clone(&self) -> ProgramHeader64<E>
fn clone(&self) -> ProgramHeader64<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 ProgramHeader64<Endian>
impl<Endian: Endian> ProgramHeader for ProgramHeader64<Endian>
type Word = u64
type Endian = Endian
type Elf = FileHeader64<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
impl<E: Copy + Endian> Copy for ProgramHeader64<E>
impl<E: Endian> Pod for ProgramHeader64<E>
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§
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