From 2d54f6f129cedad272084f4cfe3731309f4c462e Mon Sep 17 00:00:00 2001 From: Nic Gaffney Date: Wed, 28 Feb 2024 06:46:04 -0600 Subject: Enabled paging --- src/linker.ld | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/linker.ld') diff --git a/src/linker.ld b/src/linker.ld index 8a9d5f8..770b955 100644 --- a/src/linker.ld +++ b/src/linker.ld @@ -10,15 +10,16 @@ ENTRY (_start) */ SECTIONS { - /* Put sections at 1MiB, the conventional place for kernels to be + /* Put sections at 1MiB, the conventional place for kernels to be * loaded at by the bootloader. */ . = 1M; - /* First, put the multiboot header. It is required to be put - * VERY early in the image or the bootloader wont recognize the file + /* First, put the multiboot header. It is required to be put + * VERY early in the image or the bootloader wont recognize the file * format. Next, we will put the .text section*/ .text BLOCK(4K) : ALIGN(4K) { + text_start = .; *(.multiboot) *(.text) } @@ -31,14 +32,16 @@ SECTIONS .data BLOCK(4K) : ALIGN(4K) { *(.data) + end_data = .; } /* Read write data (uninitialized) and stack */ .bss BLOCK(4K) : ALIGN(4K) { + sbss = .; *(COMMON) *(.bss) + ebss = .; + endkernel = .; } - /* The compiler may produce other sections, but they will be put in - * a section with the same name by default. Add stuff here as needed */ } -- cgit v1.2.3