forked from AbleOS/ableos
36 lines
658 B
Rust
36 lines
658 B
Rust
enum Sections {
|
|
Header,
|
|
Code,
|
|
Data,
|
|
Debug,
|
|
Config,
|
|
Metadata,
|
|
}
|
|
|
|
// 64 byte header
|
|
#[repr(packed)]
|
|
struct AbleOsExecutableHeader {
|
|
magic_number: [u8; 3],
|
|
executable_version: u32,
|
|
|
|
code_length: u64,
|
|
data_length: u64,
|
|
debug_length: u64,
|
|
config_length: u64,
|
|
metadata_length: u64,
|
|
}
|
|
|
|
impl AbleOsExecutableHeader {
|
|
fn new() -> Self {
|
|
Self {
|
|
magic_number: [0x15, 0x91, 0xD2],
|
|
executable_version: 0,
|
|
code_length: 0,
|
|
config_length: 0,
|
|
data_length: 0,
|
|
debug_length: 0,
|
|
metadata_length: 0,
|
|
}
|
|
}
|
|
}
|