diff options
author | Freya Murphy <freya@freyacat.org> | 2025-04-08 10:49:18 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-04-08 10:49:18 -0400 |
commit | c8a1e0531d7ccdce5f76aec8a5b6147c686d3403 (patch) | |
tree | 2a68ab7da901a96fea975ca2ec02a9c77137686b /kernel/old/kernel.ld | |
parent | tty => term (diff) | |
download | comus-c8a1e0531d7ccdce5f76aec8a5b6147c686d3403.tar.gz comus-c8a1e0531d7ccdce5f76aec8a5b6147c686d3403.tar.bz2 comus-c8a1e0531d7ccdce5f76aec8a5b6147c686d3403.zip |
fix old checkout
Diffstat (limited to 'kernel/old/kernel.ld')
-rw-r--r-- | kernel/old/kernel.ld | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/kernel/old/kernel.ld b/kernel/old/kernel.ld new file mode 100644 index 0000000..1534aad --- /dev/null +++ b/kernel/old/kernel.ld @@ -0,0 +1,71 @@ +/* +** 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; + + .text : AT(0x10000) { + *(.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) + } + + PROVIDE(end = .); + PROVIDE(_end = .); + + /DISCARD/ : { + /* *(.stab .stab_info .stabstr) */ + *(.eh_frame .note.GNU-stack .note.gnu.property .comment) + } +} |