feat: kernel is now elf

This commit is contained in:
karina
2026-04-26 09:32:07 +04:00
parent 1463402c6c
commit 6698c4ab3f
9 changed files with 137 additions and 42 deletions
+32
View File
@@ -0,0 +1,32 @@
#pragma once
#include "../../modules/uefi/uefi.h" // IWYU pragma: keep
typedef struct {
uint8_t e_ident[16];
uint16_t e_type;
uint16_t e_machine;
uint32_t e_version;
uint64_t e_entry;
uint64_t e_phoff;
uint64_t e_shoff;
uint32_t e_flags;
uint16_t e_ehsize;
uint16_t e_phentsize;
uint16_t e_phnum;
uint16_t e_shentsize;
uint16_t e_shnum;
uint16_t e_shstrndx;
} Elf64_Ehdr;
typedef struct {
uint32_t p_type;
uint32_t p_flags;
uint64_t p_offset;
uint64_t p_vaddr;
uint64_t p_paddr;
uint64_t p_filesz;
uint64_t p_memsz;
uint64_t p_align;
} Elf64_Phdr;
#define PT_LOAD 1