From d0f47ef0cd8cb2f5079808a261dd724b3eb1a3a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matteo=20Gm=C3=BCr?= Date: Sun, 27 Oct 2024 14:12:35 +0000 Subject: Fix typos --- arch/x86_64/src/memory/multiboot/reader.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'arch/x86_64/src/memory/multiboot') diff --git a/arch/x86_64/src/memory/multiboot/reader.cpp b/arch/x86_64/src/memory/multiboot/reader.cpp index 545e517..c750ae1 100644 --- a/arch/x86_64/src/memory/multiboot/reader.cpp +++ b/arch/x86_64/src/memory/multiboot/reader.cpp @@ -55,20 +55,18 @@ namespace teachos::arch::memory::multiboot for (auto section = begin; section != end; ++section) { + if (section->virtual_address < kernel_start) + { + kernel_start = section->virtual_address; + } + auto virtual_address_end = section->virtual_address + section->section_size; + if (virtual_address_end > kernel_end) + { + kernel_end = virtual_address_end; + } + switch (section->type) { - case elf_section_type::PROGRAMM: { - if (section->virtual_address < kernel_start) - { - kernel_start = section->virtual_address; - } - auto virtual_address_end = section->virtual_address + section->section_size; - if (virtual_address_end > kernel_end) - { - kernel_end = virtual_address_end; - } - break; - } case elf_section_type::DYNAMIC_SYMBOL_TABLE: case elf_section_type::SYMBOL_TABLE: symbol_table_section_count++; -- cgit v1.2.3