aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/scripts
diff options
context:
space:
mode:
authorFabian Imhof <fabian.imhof@ost.ch>2024-11-03 13:22:34 +0000
committerFabian Imhof <fabian.imhof@ost.ch>2024-11-03 13:22:34 +0000
commitd971ee4dd26d928d9590ccbf8e39220d81787a98 (patch)
tree9fd3bf070a5edd85795e1b03d24117e59cd18ac4 /arch/x86_64/scripts
parent380bc85d1a4fdbef102132c726ef2ac7ac6355da (diff)
downloadteachos-d971ee4dd26d928d9590ccbf8e39220d81787a98.tar.xz
teachos-d971ee4dd26d928d9590ccbf8e39220d81787a98.zip
align elf sections to 4kb
Diffstat (limited to 'arch/x86_64/scripts')
-rw-r--r--arch/x86_64/scripts/kernel.ld11
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/x86_64/scripts/kernel.ld b/arch/x86_64/scripts/kernel.ld
index 3449828..e9d245f 100644
--- a/arch/x86_64/scripts/kernel.ld
+++ b/arch/x86_64/scripts/kernel.ld
@@ -37,31 +37,28 @@ SECTIONS
* data, followed by our code, initialized mutable data, and finally our
* uninitialized mutable data.
***************************************************************************/
- .boot_rodata :
+ .boot_rodata ALIGN(4K) : AT(ADDR (.boot_rodata))
{
KEEP(*(.boot_mbh))
*(.boot_rodata)
} :boot_rodata
- .boot_text :
+ .boot_text ALIGN(4K) : AT(ADDR (.boot_text))
{
*(.boot_text)
} :boot_text
- .boot_data :
+ .boot_data ALIGN(4K) : AT(ADDR (.boot_data))
{
*(.boot_data)
} :boot_data
- .boot_bss :
+ .boot_bss ALIGN(4K) : AT(ADDR (.boot_bss))
{
*(.boot_bss)
*(.boot_stack)
}
- . = ALIGN(4K);
- _end_of_image = .;
-
/***************************************************************************
* Now it is time to load the 64-bit kernel code. We virtually load it into
* the upper 2GiB, while adjusting the linear load address appropriately. We