diff options
| author | manuel <manuel@mausz.at> | 2012-03-27 11:51:08 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2012-03-27 11:51:08 +0200 |
| commit | 4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b (patch) | |
| tree | 868c52e06f207b5ec8a3cc141f4b8b2bdfcc165c /threads/kernel.lds.S | |
| parent | eae0bd57f0a26314a94785061888d193d186944a (diff) | |
| download | progos-4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b.tar.gz progos-4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b.tar.bz2 progos-4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b.zip | |
reorganize file structure to match the upstream requirements
Diffstat (limited to 'threads/kernel.lds.S')
| -rw-r--r-- | threads/kernel.lds.S | 30 |
1 files changed, 30 insertions, 0 deletions
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 @@ | |||
| 1 | #include "threads/loader.h" | ||
| 2 | |||
| 3 | OUTPUT_FORMAT("elf32-i386") | ||
| 4 | OUTPUT_ARCH("i386") | ||
| 5 | ENTRY(start) /* Kernel starts at "start" symbol. */ | ||
| 6 | SECTIONS | ||
| 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 | } | ||
