aboutsummaryrefslogtreecommitdiffstats
path: root/src/threads/kernel.lds.S
diff options
context:
space:
mode:
authorklaar36 <klas.arvidsson@liu.se>2015-03-20 17:30:24 +0100
committerklaar36 <klas.arvidsson@liu.se>2015-03-20 17:30:24 +0100
commite7bc50ca8ffcaa6ed68ebd2315f78b0f5a7d10ad (patch)
tree4de97af7207676b69cb6a9aba8cb443cc134855d /src/threads/kernel.lds.S
parentb0418a24e709f0632d2ede5b0f327c422931939b (diff)
downloadpintos-rs-e7bc50ca8ffcaa6ed68ebd2315f78b0f5a7d10ad.tar.gz
Initial Pintos
Diffstat (limited to 'src/threads/kernel.lds.S')
-rw-r--r--src/threads/kernel.lds.S26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/threads/kernel.lds.S b/src/threads/kernel.lds.S
new file mode 100644
index 0000000..6154d08
--- /dev/null
+++ b/src/threads/kernel.lds.S
@@ -0,0 +1,26 @@
+#include "threads/loader.h"
+
+OUTPUT_FORMAT("elf32-i386")
+OUTPUT_ARCH("i386")
+ENTRY(start) /* Kernel starts at "start" symbol. */
+SECTIONS
+{
+ /* Specifies the virtual address for the kernel base. */
+ . = LOADER_PHYS_BASE + LOADER_KERN_BASE;
+
+ _start = .;
+
+ /* Kernel starts with code, followed by read-only data and writable data. */
+ .text : { *(.start) *(.text) } = 0x90
+ .rodata : { *(.rodata) *(.rodata.*)
+ . = ALIGN(0x1000);
+ _end_kernel_text = .; }
+ .data : { *(.data) }
+
+ /* BSS (zero-initialized data) is after everything else. */
+ _start_bss = .;
+ .bss : { *(.bss) }
+ _end_bss = .;
+
+ _end = .;
+}