summaryrefslogtreecommitdiff
path: root/kernel/kernel.ld
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/kernel.ld')
-rw-r--r--kernel/kernel.ld38
1 files changed, 38 insertions, 0 deletions
diff --git a/kernel/kernel.ld b/kernel/kernel.ld
new file mode 100644
index 0000000..bccea62
--- /dev/null
+++ b/kernel/kernel.ld
@@ -0,0 +1,38 @@
+ENTRY(_start)
+
+SECTIONS
+{
+ . = 1M;
+
+ .boot BLOCK(4K) : ALIGN(4K)
+ {
+ KEEP(*(.multiboot_header))
+ }
+
+ .text BLOCK(4K) : ALIGN(4K)
+ {
+ *(.text)
+ }
+
+ .rodata BLOCK(4K) : ALIGN(4K)
+ {
+ *(.rodata)
+ }
+
+ .data BLOCK(4K) : ALIGN(4K)
+ {
+ *(.data)
+ }
+
+ .bss BLOCK(4K) : ALIGN(4K)
+ {
+ *(COMMON)
+ *(.bss)
+ }
+
+ /DISCARD/ :
+ {
+ *(.comment.*)
+ /* *(.note.*) */
+ }
+}