summaryrefslogtreecommitdiff
path: root/kernel/kernel.ld
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-04-03 12:31:21 -0400
committerFreya Murphy <freya@freyacat.org>2025-04-03 12:31:21 -0400
commita524eb3846aac4d1b38f08cba49ff3503107042f (patch)
treedbe81fccf975f646a681e4fdcebd227cdfb98774 /kernel/kernel.ld
parentnew libs (diff)
downloadcomus-a524eb3846aac4d1b38f08cba49ff3503107042f.tar.gz
comus-a524eb3846aac4d1b38f08cba49ff3503107042f.tar.bz2
comus-a524eb3846aac4d1b38f08cba49ff3503107042f.zip
move old kernel code (for now) into kernel/old, trying to get long mode
Diffstat (limited to 'kernel/kernel.ld')
-rw-r--r--kernel/kernel.ld47
1 files changed, 3 insertions, 44 deletions
diff --git a/kernel/kernel.ld b/kernel/kernel.ld
index 83f211c..eed5e20 100644
--- a/kernel/kernel.ld
+++ b/kernel/kernel.ld
@@ -1,71 +1,30 @@
-/*
-** Simple linker script for the 20245 kernel.
-*/
-
-OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
-OUTPUT_ARCH(i386)
ENTRY(_start)
SECTIONS
{
- /* Link the kernel at this address. */
- /* Must match what is defined in vm.h! */
- . = 0x80010000;
+ . = 1M;
- .text : AT(0x10000) {
+ .text : {
*(.text .stub .text.* .gnu.linkonce.t.*)
}
- /* standard symbols */
- PROVIDE(etext = .);
- PROVIDE(_etext = .);
-
- /* put read-only data next */
.rodata : {
*(.rodata .rodata.* .gnu.linkonce.r.*)
}
- /* Could put STABs here */
- /*
- .stab : {
- PROVIDE(__STAB_BEGIN__ = .);
- *(.stab);
- PROVIDE(__STAB_END__ = .);
- }
- .stabstr : {
- PROVIDE(__STABSTR_BEGIN__ = .);
- *(.stabstr);
- PROVIDE(__STABSTR_END__ = .);
- }
- */
-
- /* Align the data segment at the next page boundary */
. = ALIGN(0x1000);
- PROVIDE(data = .);
- PROVIDE(_data = .);
-
- /* The data segment */
.data : {
*(.data .data.*)
}
- PROVIDE(edata = .);
- PROVIDE(_edata = .);
-
- /* page-align the BSS */
. = ALIGN(0x1000);
- PROVIDE(__bss_start = .);
-
.bss : {
- *(.bss .bss.*)
*(COMMON)
+ *(.bss .bss.*)
}
- PROVIDE(end = .);
- PROVIDE(_end = .);
-
/DISCARD/ : {
*(.stab .stab_info .stabstr)
*(.eh_frame .eh_frame_hdr)