pub struct ProgramHeader {
pub p_type: u32,
pub p_offset: u64,
pub p_vaddr: u64,
pub p_paddr: u64,
pub p_filesz: u64,
pub p_memsz: u64,
pub p_flags: u32,
pub p_align: u64,
}
Expand description
Encapsulates the contents of an ELF Program Header
The program header table is an array of program header structures describing the various segments for program execution.
Fields§
§p_type: u32
Program segment type
p_offset: u64
Offset into the ELF file where this segment begins
p_vaddr: u64
Virtual adress where this segment should be loaded
p_paddr: u64
Physical address where this segment should be loaded
p_filesz: u64
Size of this segment in the file
p_memsz: u64
Size of this segment in memory
p_flags: u32
Flags for this segment
p_align: u64
file and memory alignment
Trait Implementations§
Source§impl Clone for ProgramHeader
impl Clone for ProgramHeader
Source§fn clone(&self) -> ProgramHeader
fn clone(&self) -> ProgramHeader
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 Debug for ProgramHeader
impl Debug for ProgramHeader
Source§impl ParseAt for ProgramHeader
impl ParseAt for ProgramHeader
Source§fn parse_at<E: EndianParse>(
endian: E,
class: Class,
offset: &mut usize,
data: &[u8],
) -> Result<Self, ParseError>
fn parse_at<E: EndianParse>( endian: E, class: Class, offset: &mut usize, data: &[u8], ) -> Result<Self, ParseError>
Parse this type by using the given endian-awareness and ELF class layout.
This is generic on EndianParse in order to allow users to optimize for
their expectations of data layout. See EndianParse for more details.
Source§fn size_for(class: Class) -> usize
fn size_for(class: Class) -> usize
Returns the expected size of the type being parsed for the given ELF class
Source§fn validate_entsize(class: Class, entsize: usize) -> Result<usize, ParseError>
fn validate_entsize(class: Class, entsize: usize) -> Result<usize, ParseError>
Checks whether the given entsize matches what we need to parse this type Read more
Source§impl PartialEq for ProgramHeader
impl PartialEq for ProgramHeader
impl Copy for ProgramHeader
impl Eq for ProgramHeader
impl StructuralPartialEq for ProgramHeader
Auto Trait Implementations§
impl Freeze for ProgramHeader
impl RefUnwindSafe for ProgramHeader
impl Send for ProgramHeader
impl Sync for ProgramHeader
impl Unpin for ProgramHeader
impl UnwindSafe for ProgramHeader
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