summaryrefslogtreecommitdiffstats
path: root/kernel/kernel.ld
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy.zurcher@heraeus.com>2015-11-02 11:15:48 +0100
committerJérémy Zurcher <jeremy.zurcher@heraeus.com>2015-11-02 11:15:48 +0100
commitd968266a3be79c449f62fdf6f19b8f8b5344eece (patch)
tree75c3596106e4d7b92a7223adb22f4f6cb5f5f928 /kernel/kernel.ld
downloados_skeleton-d968266a3be79c449f62fdf6f19b8f8b5344eece.zip
os_skeleton-d968266a3be79c449f62fdf6f19b8f8b5344eece.tar.gz
Initial commit
Diffstat (limited to 'kernel/kernel.ld')
-rw-r--r--kernel/kernel.ld36
1 files changed, 36 insertions, 0 deletions
diff --git a/kernel/kernel.ld b/kernel/kernel.ld
new file mode 100644
index 0000000..da9e019
--- /dev/null
+++ b/kernel/kernel.ld
@@ -0,0 +1,36 @@
+ENTRY(entrypoint) /* the entry point */
+
+SECTIONS {
+ . = 0x100000; /* all sections located above 1MB */
+
+ .bootloader ALIGN(4K): /* multiboot header first (needs to reside within the first 8KB) */
+ {
+ *(.bootloader)
+ }
+
+ .stack ALIGN(4K): /* kernel stack */
+ {
+ *(.stack)
+ }
+
+ .text ALIGN(4K) : /* code */
+ {
+ *(.text*)
+ }
+
+ .rodata ALIGN(4K) : /* read-only data */
+ {
+ *(.rodata*)
+ }
+
+ .data ALIGN(4K) : /* initialized data */
+ {
+ *(.data*)
+ }
+
+ .bss ALIGN(4K) : /* unitialized data */
+ {
+ *(COMMON)
+ *(.bss*)
+ }
+}