summaryrefslogtreecommitdiff
path: root/arch/amd64/linker.ld
diff options
context:
space:
mode:
authortrimill <trimill@trimillxyz.org>2024-01-31 21:19:22 -0500
committertrimill <trimill@trimillxyz.org>2024-01-31 21:23:51 -0500
commit7ce0cd6056fe9cc583de3f9555699e274ad7ff9a (patch)
treefed1ff18db70152c909dd728a57fe286a31fb4ae /arch/amd64/linker.ld
parentfix whitespace (diff)
downloadcorn-7ce0cd6056fe9cc583de3f9555699e274ad7ff9a.tar.gz
corn-7ce0cd6056fe9cc583de3f9555699e274ad7ff9a.tar.bz2
corn-7ce0cd6056fe9cc583de3f9555699e274ad7ff9a.zip
reorganize, add sym_lookup
Diffstat (limited to 'arch/amd64/linker.ld')
-rw-r--r--arch/amd64/linker.ld38
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/amd64/linker.ld b/arch/amd64/linker.ld
new file mode 100644
index 0000000..e097f56
--- /dev/null
+++ b/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 = .;
+}