diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-03-07 21:44:12 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-03-07 21:44:12 +0200 |
commit | 361f02166cc939879b58328cbf5e75a050c93e1d (patch) | |
tree | 09c6f0a2be4182d78d9fbbe6c4ffe56838bd1642 /src | |
parent | scheduler: fix task switching (diff) | |
download | kernel.cpp-361f02166cc939879b58328cbf5e75a050c93e1d.tar.xz |
Move multiboot header to its own section
Diffstat (limited to 'src')
-rw-r--r-- | src/boot.S | 4 | ||||
-rw-r--r-- | src/idt.cc | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -9,7 +9,7 @@ .set MULTIBOOT_ARCHITECTURE, 0 # protected mode i386 .set MULTIBOOT_HEADER_TAG_END, 0 -.section .multiboot +.section .multiboot.header, "a" .align 8 header_start: .int MULTIBOOT_HEADER_MAGIC @@ -40,7 +40,7 @@ stack_top: The linker script specifies _start as the entry point to the kernel and the bootloader will jump to this position once the kernel has been loaded. */ -.section .text +.section .multiboot.text, "ax" .extern kernel_constructors .extern kernel_main .global _start @@ -6,7 +6,7 @@ static_assert(sizeof(IDT::Pointer) == 6); constexpr uint8_t irq_base = 0x20; -static IDT::Entry table[256]; +__attribute__((section(".constinit"))) static IDT::Entry table[256]; static InterruptHandler* handlers[256] = {nullptr}; bool IDT::install(uint8_t irq, InterruptHandler* h) { |