From 2c1148e7920cf1d4c772d0d81757a7f8d736648e Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Tue, 12 May 2015 22:22:06 +0200 Subject: migrating to grub and elf kernel format --- linker.ld | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'linker.ld') diff --git a/linker.ld b/linker.ld index 52a32ef..92ca00f 100644 --- a/linker.ld +++ b/linker.ld @@ -1,24 +1,35 @@ -OUTPUT_FORMAT(binary) +ENTRY(_start) SECTIONS { - . = 0x100000; + . = 2M; .text BLOCK(4K) : ALIGN(4K) { + *(.multiboot) *(.text) } - .bss BLOCK(4K) : ALIGN(4K) + /* Read-only data. */ + .rodata BLOCK(4K) : ALIGN(4K) { - *(.bss) + *(.rodata) } + /* Read-write data (initialized) */ .data BLOCK(4K) : ALIGN(4K) { *(.data) } + /* Read-write data (uninitialized) and stack */ + .bss BLOCK(4K) : ALIGN(4K) + { + *(COMMON) + *(.bss) + *(.bootstrap_stack) + } + kernel_end = .; } -- cgit v1.2.3