aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/memory/multiboot
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-27 14:12:35 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-27 14:12:35 +0000
commitd0f47ef0cd8cb2f5079808a261dd724b3eb1a3a1 (patch)
treeaab152e3706ad16efe2bb85acb5811c25453cb65 /arch/x86_64/src/memory/multiboot
parent181f35d20e315947fa3463d6774ca164c6a4bc0d (diff)
downloadteachos-d0f47ef0cd8cb2f5079808a261dd724b3eb1a3a1.tar.xz
teachos-d0f47ef0cd8cb2f5079808a261dd724b3eb1a3a1.zip
Fix typos
Diffstat (limited to 'arch/x86_64/src/memory/multiboot')
-rw-r--r--arch/x86_64/src/memory/multiboot/reader.cpp22
1 files changed, 10 insertions, 12 deletions
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++;