use super::super::super::dtype::class_64::*;
ample::r#struct!(
pub struct Header64 {
pub sh_name: Word,
pub sh_type: Word,
pub sh_flags: XWord,
pub sh_addr: Addr,
pub sh_offset: Off,
pub sh_size: XWord,
pub sh_link: Word,
pub sh_info: Word,
pub sh_addralign: XWord,
pub sh_entsize: XWord,
}
);
impl Header64 {
pub fn flags(&self) -> Option<super::Flag> {
let flag = super::Flag::from(self.sh_flags.0);
match flag {
super::Flag::TODO => None,
_ => Some(flag),
}
}
pub fn r#type(&self) -> Option<super::Type> {
super::Type::from_discriminant(self.sh_type.0 as u32)
}
}
use super::r#type::constants::SHT_NULL;
pub const FORMER_ENTRY: Header64 = Header64 {
sh_name: Word(0), sh_type: Word(SHT_NULL), sh_flags: XWord(0), sh_addr: Addr(0), sh_offset: Off(0), sh_size: XWord(0), sh_link: Word(0), sh_info: Word(0), sh_addralign: XWord(0), sh_entsize: XWord(0), };
ample::r#struct!(
pub struct Compression64 {
pub ch_type: Word,
pub ch_reserved: Word,
pub ch_size: XWord,
pub ch_addralign: XWord,
}
);