Commit 6e280752 authored by Stefan Lankes's avatar Stefan Lankes
Browse files

rename HermitCore OS ABI to the official name "Standalone"

- disable temporary OS ABI checks
parent 8d6047a4
......@@ -10,8 +10,8 @@ pub const ELF_MAGIC: u32 = 0x464C_457F;
pub const ELF_CLASS_64: u8 = 0x02;
/// Little-Endian encoding
pub const ELF_DATA_2LSB: u8 = 0x01;
/// HermitCore OSABI identification
pub const ELF_PAD_HERMIT: u8 = 0xFF;
/// Standalone OSABI identification
pub const ELF_PAD_STANDALONE: u8 = 0xFF;
#[repr(C, packed)]
pub struct ElfIdentification {
......
......@@ -63,10 +63,14 @@ pub unsafe fn load_kernel(header_start: usize, start_address: usize, mem_size: u
assert!(header.ident.magic == ELF_MAGIC);
assert!(header.ident._class == ELF_CLASS_64);
assert!(header.ident.data == ELF_DATA_2LSB);
assert!(header.ident.pad[0] == ELF_PAD_HERMIT);
//assert!(header.ident.pad[0] == ELF_PAD_STANDALONE);
assert!(header.ty == ELF_ET_EXEC);
assert!(header.machine == ELF_ARCH);
if header.ident.pad[0] != ELF_PAD_STANDALONE {
loaderlog!("Unsupported OS ABI 0x{:x}", header.ident.pad[0]);
}
let address = map_memory(start_address, mem_size);
loaderlog!("Load HermitCore Application as 0x{:x}", address);
......@@ -104,7 +108,7 @@ pub unsafe fn check_kernel_elf_file(start_address: usize) -> (usize, usize, usiz
assert!(header.ident.magic == ELF_MAGIC);
assert!(header.ident._class == ELF_CLASS_64);
assert!(header.ident.data == ELF_DATA_2LSB);
assert!(header.ident.pad[0] == ELF_PAD_HERMIT);
//assert!(header.ident.pad[0] == ELF_PAD_STANDALONE);
assert!(header.ty == ELF_ET_EXEC);
assert!(header.machine == ELF_ARCH);
loaderlog!("This is a supported HermitCore Application");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment