diff options
-rw-r--r-- | linker.ld | 31 |
1 files changed, 7 insertions, 24 deletions
@@ -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. */ |