Unverified Commit 2fd86747 authored by PhoeniX's avatar PhoeniX

Remove stack start (/size) from LD script

parent 2991f0d4
......@@ -5,7 +5,6 @@
OUTPUT_FORMAT(elf64-x86-64)
ENTRY(_efi_start)
PROVIDE(__stack_start__ = 0x1000);
PROVIDE(__stack_end__ = 0x2000);
PROVIDE(__first_page__ = 0x2000);
PROVIDE(__pagetable__ = 0x20000);
......
......@@ -85,9 +85,11 @@ void Pagetable::init() {
const EFI_SYSTEM_TABLE *ST = EFI::getSystemTable();
MULTIBOOT_PAYLOAD *multiboot = Multiboot::getPayload();
static const size_t stack_size = 0x1000;
asm volatile("mov %%cr3, %q0":"=r"(pagetable));
asm volatile("lea __stack_start__(%%rip), %q0":"=r"(stack_start));
asm volatile("lea __stack_end__(%%rip), %q0":"=r"(stack_top));
stack_start = stack_top - stack_size;
asm volatile("lea __text_start__(%%rip), %q0":"=r"(text_start));
asm volatile("lea __data_end__(%%rip), %q0":"=r"(data_top));
asm volatile("lea __modules_start__(%%rip), %q0":"=r"(modules_start));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment