pub struct ProgramHeader {
pub p_type: ProgramType,
pub offset: u32,
pub vaddr: u32,
pub paddr: u32,
pub filesz: u32,
pub memsz: u32,
pub flags: u32,
pub align: u32,
}Expand description
ELF program header (segment)
Fields§
§p_type: ProgramTypeSegment type
offset: u32Offset in file
vaddr: u32Virtual address
paddr: u32Physical address
filesz: u32Size in file
memsz: u32Size in memory
flags: u32Flags (R/W/X)
align: u32Alignment
Implementations§
Source§impl ProgramHeader
impl ProgramHeader
Sourcepub fn load_nobits(vaddr: u32, memsz: u32, flags: u32) -> Self
pub fn load_nobits(vaddr: u32, memsz: u32, flags: u32) -> Self
Create a new LOAD segment for BSS-like regions (no file data, only memory) Used for .bss, linear memory, and other zero-initialized regions
Trait Implementations§
Source§impl Clone for ProgramHeader
impl Clone for ProgramHeader
Source§fn clone(&self) -> ProgramHeader
fn clone(&self) -> ProgramHeader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProgramHeader
impl RefUnwindSafe for ProgramHeader
impl Send for ProgramHeader
impl Sync for ProgramHeader
impl Unpin for ProgramHeader
impl UnsafeUnpin 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