summaryrefslogtreecommitdiff
path: root/src/arch/amd64/linker.ld
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-02-01 12:48:55 -0500
committerFreya Murphy <freya@freyacat.org>2024-02-01 12:49:44 -0500
commit192a4ccd6bbc2239f047f782a05e888990011e51 (patch)
tree2b3d8a194d3dd33a5d344b4ec6376dbdfdb3eb0c /src/arch/amd64/linker.ld
parentundo bad decisions (diff)
downloadcorn-192a4ccd6bbc2239f047f782a05e888990011e51.tar.gz
corn-192a4ccd6bbc2239f047f782a05e888990011e51.tar.bz2
corn-192a4ccd6bbc2239f047f782a05e888990011e51.zip
acpi, fix mboot memory map, fix kalloc, fix virtalloc node allocator, add kprintf, other changes
Diffstat (limited to 'src/arch/amd64/linker.ld')
-rw-r--r--src/arch/amd64/linker.ld38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/arch/amd64/linker.ld b/src/arch/amd64/linker.ld
new file mode 100644
index 0000000..0032765
--- /dev/null
+++ b/src/arch/amd64/linker.ld
@@ -0,0 +1,38 @@
+ENTRY(start)
+
+SECTIONS {
+ . = 1M;
+
+ kernel_start = .;
+
+ .boot BLOCK(4K) : ALIGN(4K)
+ {
+ *(.multiboot)
+ }
+
+ .rodata BLOCK(4K) : ALIGN(4K)
+ {
+ *(.rodata)
+ }
+
+ .data BLOCK(4K) : ALIGN(4K)
+ {
+ *(.data)
+ }
+
+ text_start = .;
+
+ .text BLOCK(4K) : ALIGN(4K)
+ {
+ *(.text)
+ }
+
+ text_end = .;
+
+ .bss BLOCK(4K) : ALIGN(4K)
+ {
+ *(.bss)
+ }
+
+ kernel_end = .;
+}