From 378e886f688423bdcb596812e43e55ece2932c5e Mon Sep 17 00:00:00 2001 From: Max Tyson <98maxt98@gmail.com> Date: Fri, 21 Mar 2025 21:39:38 +1300 Subject: [PATCH] Fix mappings This hasnt changed your actual function, you should do that as you know how your VMM works --- src/kernel/loaders/elf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/kernel/loaders/elf.c b/src/kernel/loaders/elf.c index 85717f2..abc1b9f 100644 --- a/src/kernel/loaders/elf.c +++ b/src/kernel/loaders/elf.c @@ -112,11 +112,11 @@ bool parse_section_header(Elf64_Ehdr *elf_start, uint64_t size, executable_loade */ uint64_t elf_flags_to_memory_flags(Elf64_Word flags) { // This function will be movede into the arch dependant code - // Elf flags: - // 1 = Read - // 2 = Write - // 4 = Execute - // They can be mixed. + // Conversion + // ELF | VMM + // 0x0 | Executable + // 0x1 | Write + // 0x2 | Read uint64_t flags_to_return = (flags & 0b10); return flags_to_return; }