summaryrefslogtreecommitdiffstats
path: root/pintos-progos/threads/kernel.lds.S
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2012-03-26 12:54:45 +0200
committermanuel <manuel@mausz.at>2012-03-26 12:54:45 +0200
commitb5f0874cd96ee2a62aabc645b9626c2749cb6a01 (patch)
tree1262e4bbe0634de6650be130c36e0538240f4cbf /pintos-progos/threads/kernel.lds.S
downloadprogos-b5f0874cd96ee2a62aabc645b9626c2749cb6a01.tar.gz
progos-b5f0874cd96ee2a62aabc645b9626c2749cb6a01.tar.bz2
progos-b5f0874cd96ee2a62aabc645b9626c2749cb6a01.zip
initial pintos checkin
Diffstat (limited to 'pintos-progos/threads/kernel.lds.S')
-rw-r--r--pintos-progos/threads/kernel.lds.S30
1 files changed, 30 insertions, 0 deletions
diff --git a/pintos-progos/threads/kernel.lds.S b/pintos-progos/threads/kernel.lds.S
new file mode 100644
index 0000000..19082d5
--- /dev/null
+++ b/pintos-progos/threads/kernel.lds.S
@@ -0,0 +1,30 @@
1#include "threads/loader.h"
2
3OUTPUT_FORMAT("elf32-i386")
4OUTPUT_ARCH("i386")
5ENTRY(start) /* Kernel starts at "start" symbol. */
6SECTIONS
7{
8 /* Specify the kernel base address. */
9 _start = LOADER_PHYS_BASE + LOADER_KERN_BASE;
10
11 /* Make room for the ELF headers. */
12 . = _start + SIZEOF_HEADERS;
13
14 /* Kernel starts with code, followed by read-only data and writable data. */
15 .text : { *(.start) *(.text) } = 0x90
16 .rodata : { *(.rodata) *(.rodata.*)
17 . = ALIGN(0x1000);
18 _end_kernel_text = .; }
19 .data : { *(.data)
20 _signature = .; LONG(0xaa55aa55) }
21
22 /* BSS (zero-initialized data) is after everything else. */
23 _start_bss = .;
24 .bss : { *(.bss) }
25 _end_bss = .;
26
27 _end = .;
28
29 ASSERT (_end - _start <= 512K, "Kernel image is too big.")
30}