pub struct Header {
pub magic: u32,
pub version_current: u32,
pub version_minimal: u32,
pub min: [u16; 3],
pub max: [u16; 3],
pub mode: ExecMode,
pub sections: u16,
pub entry_sec: u16,
pub entry_off: u32,
pub author: [u8; 32],
pub name: [u8; 32],
pub _reserved: [u8; 20],
/* private fields */
}Expand description
The main header struct, which contains the metadata of the PKE file.
Fields§
§magic: u32The magic number, fixed to ‘PKEX’
version_current: u32Format version used to generate this PKEX binary.
Represents the PKEX file specification revision that the builder followed
when creating this executable. This is separate from version_minimum.
- Breaking binary layout changes: increment this value, set
version_minimumequal to it. - Backward-compatible extensions (only using reserved space): increment this value,
leave
version_minimumunchanged.
version_minimal: u32Lowest PKEX format version that can parse this binary correctly.
Loader enforcement rule: If the maximum format version supported by the loader is less than this value, the loader MUST reject loading this executable.
min: [u16; 3]The minimal kernel version supported.
§Note
As the proka-bootloader’s definitions, its format is similar
like [major, minor, fix]. See proka-bootloader crate for more informations.
max: [u16; 3]The maximum kernel supported.
For notes, see above.
mode: ExecModeSignifies is this executable run as userapp or coredrv.
sections: u16The section table count.
entry_sec: u16The section which contains the entry point.
entry_off: u32The entry offset of the section.
The author name (max length is 32 bytes).
name: [u8; 32]The executable/project name.
_reserved: [u8; 20]Reserved fields
Implementations§
Trait Implementations§
impl Copy for Header
impl Pod for Header
Auto Trait Implementations§
impl Freeze for Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnsafeUnpin for Header
impl UnwindSafe for Header
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
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
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self.