Something went wrong. Try again.
A custom OS written in Zig
Something went wrong. Try again.
1234567891011121314151617181920use bitflags::bitflags;use elf::segment::ProgramHeader;
bitflags! { #[derive(Debug, Clone, Copy)] pub struct ElfSegmentFlags: u32 { const EXECUTABLE = 1 << 0; const WRITABLE = 1 << 1; const READABLE = 1 << 2;
// The source may set any bits const _ = !0; }}
impl From<ProgramHeader> for ElfSegmentFlags { fn from(value: ProgramHeader) -> Self { Self::from_bits_retain(value.p_flags) }}