pub struct LoadSegment {
pub vaddr: u64,
pub mem_size: u64,
pub file_size: u64,
pub perms: PagePerms,
pub bytes: Vec<u8>,
}Expand description
Keeps file and memory sizes separate because ELF load segments can contain zero-filled BSS.
Fields§
§vaddr: u64Gives the first guest virtual address of the segment.
mem_size: u64Gives the total mapped size, including the zero-filled tail.
file_size: u64Gives the number of initialized bytes copied from the file.
perms: PagePermsGives the guest access permissions from the ELF program header.
bytes: Vec<u8>Owns the initialized file bytes after the source ELF buffer is gone.
Trait Implementations§
Source§impl Clone for LoadSegment
impl Clone for LoadSegment
Source§fn clone(&self) -> LoadSegment
fn clone(&self) -> LoadSegment
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 LoadSegment
impl RefUnwindSafe for LoadSegment
impl Send for LoadSegment
impl Sync for LoadSegment
impl Unpin for LoadSegment
impl UnsafeUnpin for LoadSegment
impl UnwindSafe for LoadSegment
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