aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/scripts
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2025-07-23 07:26:45 +0000
committerFelix Morgner <felix.morgner@ost.ch>2025-07-23 07:26:45 +0000
commitb4c45759c94d61493bbb88dacfd5c1bccfb13ac6 (patch)
tree6db43e7ec8084ce14be525181c57a42ddefb1023 /arch/x86_64/scripts
parent24a9f628656188d0e6ec4a7537ee758c1a88a847 (diff)
downloadteachos-b4c45759c94d61493bbb88dacfd5c1bccfb13ac6.tar.xz
teachos-b4c45759c94d61493bbb88dacfd5c1bccfb13ac6.zip
x86_64: remove stray copy of ld script
Diffstat (limited to 'arch/x86_64/scripts')
-rw-r--r--arch/x86_64/scripts/x86-64-linker-script.txt150
1 files changed, 0 insertions, 150 deletions
diff --git a/arch/x86_64/scripts/x86-64-linker-script.txt b/arch/x86_64/scripts/x86-64-linker-script.txt
deleted file mode 100644
index 3d9a7ae..0000000
--- a/arch/x86_64/scripts/x86-64-linker-script.txt
+++ /dev/null
@@ -1,150 +0,0 @@
-ENTRY(_start)
-
-/*****************************************************************************
- * Virtual and linear start addresses of the TeachOS kernel
- *****************************************************************************/
-TEACHOS_LOW = 1M;
-
-PHDRS {
- boot_rodata PT_LOAD FLAGS(4);
- boot_text PT_LOAD FLAGS(5);
- boot_data PT_LOAD FLAGS(6);
-
- text PT_LOAD FLAGS(5);
- data PT_LOAD FLAGS(6);
- rodata PT_LOAD FLAGS(4);
-}
-
-SECTIONS
-{
- /***************************************************************************
- * Load the bootstrap code into low memory. We need to be accessible in
- * 32-Bit mode, so we want to live down low, but we need to leave the 1MiB
- * hole open since some BIOS functionality resides below it.
- ***************************************************************************/
- . = TEACHOS_LOW;
-
- /***************************************************************************
- * We want to be able to be able to access all memory (linear and virtual)
- * during bootstrapping and operation. To achieve this, we define some
- * symbols at the beginning.
- ***************************************************************************/
- _start_linear = .;
- _start_virtual = .;
-
- /***************************************************************************
- * The bootstrapping infratructure goes first. We first place the read-only
- * data, followed by our code, initialized mutable data, and finally our
- * uninitialized mutable data.
- ***************************************************************************/
- .boot_rodata ALIGN(4K) : AT(ADDR (.boot_rodata))
- {
- KEEP(*(.boot_mbh))
- *(.boot_rodata)
- } :boot_rodata
-
- .boot_text ALIGN(4K) : AT(ADDR (.boot_text))
- {
- *(.boot_text)
- } :boot_text
-
- .boot_bss ALIGN(4K) : AT(ADDR (.boot_bss))
- {
- *(.boot_bss)
- *(.boot_stack)
- }
-
- .boot_data ALIGN(4K) : AT(ADDR (.boot_data))
- {
- *(.boot_data)
- } :boot_data
-
- /***************************************************************************
- * Now it is time to load the 64-bit kernel code. We
- * make sure to align the loaded data onto a page boundary.
- ***************************************************************************/
- .init ALIGN(4K) : AT(ADDR (.init))
- {
- /*
- * Make sure that the crt code is wrapped around the compiler generated
- * initialization code.
- */
- KEEP(*crti.s.o*(.init))
- KEEP(*(EXCLUDE_FILE (*crti.s.o* *crtn.s.o*) .init))
- KEEP(*crtn.s.o*(.init))
- } :text
-
- .fini ALIGN(4K) : AT(ADDR (.fini))
- {
- /*
- * Make sure that the crt code is wrapped around the compiler generated
- * finalizer code.
- */
- KEEP(*crti.s.o*(.fini))
- KEEP(*(EXCLUDE_FILE (*crti.s.o* *crtn.s.o*) .fini))
- KEEP(*crtn.s.o*(.fini))
- }
-
- .stl_text ALIGN(4K) : AT(ADDR (.stl_text))
- {
- *(.stl_text .stl_text*)
- KEEP(*libstdc++.a:*(.text .text.*))
- }
-
- .text ALIGN(4K) : AT(ADDR (.text))
- {
- *(.text .text.*)
- }
-
- .user_text ALIGN(4K) : AT(ADDR (.user_text))
- {
- *(.user_text .user_text.*)
- }
-
- .rodata ALIGN(4K) : AT (ADDR (.rodata))
- {
- *(.rodata)
- *(.rodata.*)
- } :rodata
-
- .ctors ALIGN(4K) : AT (ADDR (.ctors))
- {
- KEEP(*crtbegin.o(.ctors))
- KEEP(*(EXCLUDE_FILE (*crtend.o) .ctors))
- KEEP(*(SORT(.ctors.*)))
- KEEP(*crtend.o(.ctors))
- } :data
-
- .dtors ALIGN(4K) : AT (ADDR (.dtors))
- {
- KEEP(*crtbegin.o(.dtors))
- KEEP(*(EXCLUDE_FILE (*crtend.o) .dtors))
- KEEP(*(SORT(.dtors.*)))
- KEEP(*crtend.o(.dtors))
- }
-
- .bss ALIGN(4K) : AT (ADDR (.bss))
- {
- *(COMMON)
- *(.bss*)
- }
-
- .data ALIGN(4K) : AT (ADDR (.data))
- {
- *(.data*)
- }
-
- .user_data ALIGN(4K) : AT (ADDR (.user_data))
- {
- *(.user_data .user_data.*)
- }
-
- /***************************************************************************
- * In accordance with the symbol definitions at the start, we generate some
- * symbols to mark the end of our loaded image.
- ***************************************************************************/
- _end_virtual = ADDR(.bss) + SIZEOF(.bss);
- _end_linear = _end_virtual;
-
- /DISCARD/ : { *(.comment) }
-}