aboutsummaryrefslogtreecommitdiff
path: root/src/linker.ld
diff options
context:
space:
mode:
authorNic Gaffney <gaffney_nic@protonmail.com>2024-02-28 06:46:04 -0600
committerNic Gaffney <gaffney_nic@protonmail.com>2024-02-28 06:46:04 -0600
commit2d54f6f129cedad272084f4cfe3731309f4c462e (patch)
tree0459fc1d595b251ea8a8eb19b17105ae4c200faf /src/linker.ld
parent67e379966c657eccb3086508fa9bff38b831fbde (diff)
downloadgftos-2d54f6f129cedad272084f4cfe3731309f4c462e.tar.gz
Enabled paging
Diffstat (limited to 'src/linker.ld')
-rw-r--r--src/linker.ld13
1 files changed, 8 insertions, 5 deletions
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 */
}