aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/kernel
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-06 12:40:33 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-06 12:40:33 +0000
commitb9c5aea495653bb9fc347fa6ba5976b42510af53 (patch)
tree139f3c8d4959d91f380e903f5dd05220cbc3e765 /arch/x86_64/src/kernel
parent241c17a52e3954a6c1cf8d38f402d240070a5818 (diff)
downloadteachos-b9c5aea495653bb9fc347fa6ba5976b42510af53.tar.xz
teachos-b9c5aea495653bb9fc347fa6ba5976b42510af53.zip
Added elf section type enum
Diffstat (limited to 'arch/x86_64/src/kernel')
-rw-r--r--arch/x86_64/src/kernel/main.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86_64/src/kernel/main.cpp b/arch/x86_64/src/kernel/main.cpp
index fa1e464..481264c 100644
--- a/arch/x86_64/src/kernel/main.cpp
+++ b/arch/x86_64/src/kernel/main.cpp
@@ -24,8 +24,8 @@ namespace teachos::arch::kernel
auto print_memory_map(arch::memory::memory_map * mminfo) -> void
{
auto expected_entry_size = mminfo->entry_size;
- constexpr auto actual_size = sizeof(arch::memory::memory_area);
- assert(expected_entry_size == actual_size);
+ constexpr auto actual_entry_size = sizeof(arch::memory::memory_area);
+ assert(expected_entry_size == actual_entry_size);
auto remaining_size = mminfo->tag.size - (4 * sizeof(uint32_t));
auto entry_amount = remaining_size / mminfo->entry_size;
@@ -40,6 +40,10 @@ namespace teachos::arch::kernel
auto print_elf_sections(arch::memory::elf_symbols_section * symbol) -> void
{
+ auto expected_entry_size = symbol->entsize;
+ constexpr auto actual_entry_size = sizeof(arch::memory::elf_section_header);
+ assert(expected_entry_size == actual_entry_size);
+
auto begin = &symbol->sections;
auto end = begin + symbol->num;
for (auto section = begin; section != end; ++section)