aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/scripts
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-06 08:45:04 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-06 08:45:04 +0000
commitf7df7167f0c54bd8da79dbf2d48bda5d7491fd32 (patch)
tree716dc5e9566cc57c2d534dd47487186a4767cf41 /arch/x86_64/scripts
parent1ab9c3c09d32283b39ca1026a9e29ada5ff7fda5 (diff)
downloadteachos-f7df7167f0c54bd8da79dbf2d48bda5d7491fd32.tar.xz
teachos-f7df7167f0c54bd8da79dbf2d48bda5d7491fd32.zip
Remove high memory kernel and needless prints
Diffstat (limited to 'arch/x86_64/scripts')
-rw-r--r--arch/x86_64/scripts/kernel.ld22
1 files changed, 10 insertions, 12 deletions
diff --git a/arch/x86_64/scripts/kernel.ld b/arch/x86_64/scripts/kernel.ld
index 943266c..31d8be3 100644
--- a/arch/x86_64/scripts/kernel.ld
+++ b/arch/x86_64/scripts/kernel.ld
@@ -3,7 +3,6 @@ ENTRY(_start)
/*****************************************************************************
* Virtual and linear start addresses of the TeachOS kernel
*****************************************************************************/
-TEACHOS_HIGH = -2048M;
TEACHOS_LOW = 1M;
PHDRS {
@@ -31,7 +30,7 @@ SECTIONS
* symbols at the beginning.
***************************************************************************/
_start_linear = .;
- _start_virtual = . + TEACHOS_HIGH;
+ _start_virtual = .;
/***************************************************************************
* The bootstrapping infratructure goes first. We first place the read-only
@@ -66,9 +65,8 @@ SECTIONS
* also make sure to align the loaded data onto a page boundary.
***************************************************************************/
. = ALIGN(4K);
- . += TEACHOS_HIGH;
- .init ALIGN(4K) : AT(ADDR (.init) - TEACHOS_HIGH)
+ .init ALIGN(4K) : AT(ADDR (.init))
{
/*
* Make sure that the crt code is wrapped around the compiler generated
@@ -79,7 +77,7 @@ SECTIONS
KEEP(*crtn.s.o*(.init))
} :text
- .fini ALIGN(4K) : AT(ADDR (.fini) - TEACHOS_HIGH)
+ .fini ALIGN(4K) : AT(ADDR (.fini))
{
/*
* Make sure that the crt code is wrapped around the compiler generated
@@ -90,18 +88,18 @@ SECTIONS
KEEP(*crtn.s.o*(.fini))
}
- .text ALIGN(4K) : AT(ADDR (.text) - TEACHOS_HIGH)
+ .text ALIGN(4K) : AT(ADDR (.text))
{
*(.text*)
}
- .rodata ALIGN(4K) : AT (ADDR (.rodata) - TEACHOS_HIGH)
+ .rodata ALIGN(4K) : AT (ADDR (.rodata))
{
*(.rodata)
*(.rodata.*)
} :rodata
- .ctors ALIGN(4K) : AT (ADDR (.ctors) - TEACHOS_HIGH)
+ .ctors ALIGN(4K) : AT (ADDR (.ctors))
{
KEEP(*crtbegin.o(.ctors))
KEEP(*(EXCLUDE_FILE (*crtend.o) .ctors))
@@ -109,7 +107,7 @@ SECTIONS
KEEP(*crtend.o(.ctors))
} :data
- .dtors ALIGN(4K) : AT (ADDR (.dtors) - TEACHOS_HIGH)
+ .dtors ALIGN(4K) : AT (ADDR (.dtors))
{
KEEP(*crtbegin.o(.dtors))
KEEP(*(EXCLUDE_FILE (*crtend.o) .dtors))
@@ -117,12 +115,12 @@ SECTIONS
KEEP(*crtend.o(.dtors))
}
- .data ALIGN(4K) : AT (ADDR (.data) - TEACHOS_HIGH)
+ .data ALIGN(4K) : AT (ADDR (.data))
{
*(.data*)
}
- .bss ALIGN(4K) : AT (ADDR (.bss) - TEACHOS_HIGH)
+ .bss ALIGN(4K) : AT (ADDR (.bss))
{
*(COMMON)
*(.bss*)
@@ -133,7 +131,7 @@ SECTIONS
* symbols to mark the end of our loaded image.
***************************************************************************/
_end_virtual = ADDR(.bss) + SIZEOF(.bss);
- _end_linear = _end_virtual - TEACHOS_HIGH;
+ _end_linear = _end_virtual;
/DISCARD/ : { *(.comment) }
}