aboutsummaryrefslogtreecommitdiff
path: root/defs/x86_64-linker.ld
diff options
context:
space:
mode:
authorTianhao Wang <shrik3@mailbox.org>2024-04-18 04:28:53 +0200
committerTianhao Wang <shrik3@mailbox.org>2024-06-11 15:16:34 +0200
commita0944efb047b0789598edc6236c0287d10aeab60 (patch)
treeb6c0e0bac72de3d12d747da7042fdba243d4b0fd /defs/x86_64-linker.ld
parent26c7262747930cebbd20dd7194f1245798bacdf6 (diff)
chore
Diffstat (limited to 'defs/x86_64-linker.ld')
-rw-r--r--defs/x86_64-linker.ld76
1 files changed, 39 insertions, 37 deletions
diff --git a/defs/x86_64-linker.ld b/defs/x86_64-linker.ld
index 1f53bf8..caecb48 100644
--- a/defs/x86_64-linker.ld
+++ b/defs/x86_64-linker.ld
@@ -5,7 +5,7 @@ MB_CHKSUM = 0x100000000 - (MB_MAGIC + MB_FLAGS);
SECTIONS
{
- . = 0x100000; /* system's start address */
+ . = 0x100000; /* system's start address */
.boot :
{
@@ -22,24 +22,25 @@ SECTIONS
LONG(0)
LONG(0)
header_end = .;
- }
+ }
- PROVIDE (___KERNEL_START__ = .);
- .text :
- {
- *(".text")
- *(".text.*")
- *(".text$")
- }
+ PROVIDE (___KERNEL_START__ = .);
+ .text :
+ {
+ *(".text")
+ *(".text.*")
+ *(".text$")
+ }
- .data :
- {
- *(".data")
- *(".data.*")
- *(".data$")
- }
+ .data :
+ {
+ *(".data")
+ *(".data.*")
+ *(".data$")
+ }
- .reserved : {
+ .reserved :
+ {
*(".reserved")
*(".reserved.*")
}
@@ -49,32 +50,33 @@ SECTIONS
* for zeroing because it's explicitly overwritten anyways. I KNOW WHAT I'M
* DOING! An example is the idt.
*/
- .reserved_0 (NOLOAD) : {
+ .reserved_0 (NOLOAD) :
+ {
*(".reserved_0")
*(".reserved_0.*")
}
- .rodata :
- {
- *(".rodata")
- *(".rodata$")
- *(".rodata.*")
- }
+ .rodata :
+ {
+ *(".rodata")
+ *(".rodata$")
+ *(".rodata.*")
+ }
- .bss :
- {
- PROVIDE (___BSS_START__ = .);
- *(".bss")
- *(".bss.*")
- PROVIDE (___BSS_END__ = .);
- }
+ .bss :
+ {
+ PROVIDE (___BSS_START__ = .);
+ *(".bss")
+ *(".bss.*")
+ PROVIDE (___BSS_END__ = .);
+ }
- /* global page table for 64-bit long mode */
- .global_pagetable ALIGN(4096) (NOLOAD) :
- {
- *(".global_pagetable")
- }
+ /* global page table for 64-bit long mode */
+ .global_pagetable ALIGN(4096) (NOLOAD) :
+ {
+ *(".global_pagetable")
+ }
- . = ALIGN(4096);
- PROVIDE (___KERNEL_END__ = .);
+ . = ALIGN(4096);
+ PROVIDE (___KERNEL_END__ = .);
}