use flagset::flags;
flags! {
#[non_exhaustive]
pub enum ProgramHeaderFlags: u32 {
Null = 0,
Loadable = 1,
Dynamic = 2,
Interpreter = 3,
Note = 4,
Reserved = 5,
ProgramHeaderTable = 6,
TLS = 7,
LoOS = 0x6000_0000,
HiOS = 0x6fff_ffff,
LoProc = 0x7000_0000,
HiProc = 0x7fff_ffff,
}
#[non_exhaustive]
pub enum SectionHeaderTypes: u32 {
NULL = 0,
ProgramBits = 1,
SymbolTable = 2,
StringTable = 3,
RelocationsAddends = 4,
Hash = 5,
DynamicLinking = 6,
Notes = 7,
NoBits = 8,
Relocations = 9,
Shlib = 0xA,
DynamicSymbolsTable = 0xB,
InitArray = 0xE,
FiniArray = 0xF,
PreInitArray = 0x10,
Group = 0x11,
ExtendedIndices = 0x12,
NumTypes = 0x13,
LoOS = 0x6000_0000,
GnuAttributes = 0x6fff_fff5,
GnuHash = 0x6fff_fff6,
LibList = 0x6fff_fff7,
VerDef = 0x6fff_fffd,
VerNeed = 0x6fff_fffe,
VerSym = 0x6fff_ffff,
HiOS = 0x6fff_ffff,
LoProc = 0x7000_0000,
MipsABI = 0x7000_002a,
HiProc = 0x7fff_ffff,
LoUser = 0x8000_0000,
HiUser = 0xffff_ffff,
}
#[non_exhaustive]
pub enum SectionHeaderFlags: u32 {
Write = 1,
Alloc = 2,
Exec = 4,
Mergeable = 0x10,
Strings = 0x20,
InfoLink = 0x40,
LinkOrder = 0x80,
OSNonConforming = 0x100,
Group = 0x200,
TLS = 0x400,
Compressed = 0x800,
MaskOS = 0x0ff0_0000,
MaskProc = 0xf000_0000,
}
}