From 4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 27 Mar 2012 11:51:08 +0200 Subject: reorganize file structure to match the upstream requirements --- threads/kernel.lds.S | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 threads/kernel.lds.S (limited to 'threads/kernel.lds.S') diff --git a/threads/kernel.lds.S b/threads/kernel.lds.S new file mode 100644 index 0000000..19082d5 --- /dev/null +++ b/threads/kernel.lds.S @@ -0,0 +1,30 @@ +#include "threads/loader.h" + +OUTPUT_FORMAT("elf32-i386") +OUTPUT_ARCH("i386") +ENTRY(start) /* Kernel starts at "start" symbol. */ +SECTIONS +{ + /* Specify the kernel base address. */ + _start = LOADER_PHYS_BASE + LOADER_KERN_BASE; + + /* Make room for the ELF headers. */ + . = _start + SIZEOF_HEADERS; + + /* 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) + _signature = .; LONG(0xaa55aa55) } + + /* BSS (zero-initialized data) is after everything else. */ + _start_bss = .; + .bss : { *(.bss) } + _end_bss = .; + + _end = .; + + ASSERT (_end - _start <= 512K, "Kernel image is too big.") +} -- cgit v1.2.3