diff options
Diffstat (limited to 'arch/i386/linker.ld')
-rw-r--r-- | arch/i386/linker.ld | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/arch/i386/linker.ld b/arch/i386/linker.ld index a864c34..5d06e79 100644 --- a/arch/i386/linker.ld +++ b/arch/i386/linker.ld @@ -1,19 +1,29 @@ ENTRY(_start) SECTIONS { - . = 1M; - .text BLOCK(4K) : ALIGN(4K) { - *(.multiboot) + . = 0x00100000; + _kernel_start = .; + .multiboot.data : { + *(.multiboot.data) + } + .multiboot.text : { + *(.multiboot.text) + } + + . += 0xC0000000; + .text ALIGN(4K) : AT(ADDR(.text) - 0xC0000000) { *(.text) } - .rodata BLOCK(4K) : ALIGN(4K) { + .rodata ALIGN(4K) : AT(ADDR(.rodata) - 0xC0000000) { *(.rodata) } - .data BLOCK(4K) : ALIGN(4K) { + .data ALIGN(4K) : AT(ADDR(.data) - 0xC0000000) { *(.data) } - .bss BLOCK(4K) : ALIGN(4K) { + .bss ALIGN(4K) : AT(ADDR(.bss) - 0xC0000000) { *(COMMON) *(.bss) + *(.bootstrap_stack) } + _kernel_end = .; } |