From d02d702daa3a3232ebdd712722d2483449eb8582 Mon Sep 17 00:00:00 2001 From: iximeow Date: Wed, 25 Mar 2015 23:35:38 -0700 Subject: fix up linker.ld to actually... work. --- linker.ld | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/linker.ld b/linker.ld index 7486136..5fd7736 100644 --- a/linker.ld +++ b/linker.ld @@ -8,34 +8,17 @@ SECTIONS { /* Begin putting sections at 1 MiB, a conventional place for kernels to be loaded at by the bootloader. */ - . = 10K; + . = 0x7e00; - /* First put the multiboot header, as it is required to be put very early - early in the image or the bootloader won't recognize the file format. - Next we'll put the .text section. */ - .text BLOCK(4K) : ALIGN(4K) - { - *(.text) - } + .text : ALIGN(0x100) { *(.text) } - /* Read-only data. */ - .rodata BLOCK(4K) : ALIGN(4K) - { - *(.rodata) - } + .rodata : ALIGN(0x100) { *(.rodata) } - /* Read-write data (initialized) */ - .data BLOCK(4K) : ALIGN(4K) - { - *(.data) - } + .data : ALIGN(0x100) { *(.data) } - /* Read-write data (uninitialized) and stack */ - .bss BLOCK(4K) : ALIGN(4K) - { - *(.bss) - *(.bootstrap_stack) - } + .bss : ALIGN(0x100) { *(.bss) } + + /DISCARD/ : { *(.note.gnu.build-id) } /* The compiler may produce other sections, by default it will put them in a segment with the same name. Simply add stuff here as needed. */ -- cgit v1.1