#[repr(C)]pub struct ProgramHeader {
pub segment_type: u32,
pub flags: u32,
pub offset: u64,
pub virtual_address: u64,
pub physical_address: u64,
pub file_size: u64,
pub mem_size: u64,
pub alignment: u64,
}
Fields§
§segment_type: u32
§flags: u32
§offset: u64
§virtual_address: u64
§physical_address: u64
§file_size: u64
§mem_size: u64
§alignment: u64
Implementations§
Source§impl ProgramHeader
impl ProgramHeader
pub fn segment_type(&self) -> SegmentType
pub fn data<'a>(&self, elf: &'a Elf<'_>) -> &'a [u8]
pub fn is_executable(&self) -> bool
pub fn is_writable(&self) -> bool
pub fn is_readable(&self) -> bool
Sourcepub fn iterate_note_entries<'a>(&self, elf: &'a Elf<'_>) -> Option<NoteIter<'a>>
pub fn iterate_note_entries<'a>(&self, elf: &'a Elf<'_>) -> Option<NoteIter<'a>>
If this is a PT_NOTE
segment, iterate the entries. Returns None
if this isn’t a note
segment.
Trait Implementations§
Source§impl Debug for ProgramHeader
impl Debug for ProgramHeader
Source§impl<'a> TryFromCtx<'a, Endian> for ProgramHeaderwhere
ProgramHeader: 'a,
impl<'a> TryFromCtx<'a, Endian> for ProgramHeaderwhere
ProgramHeader: 'a,
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