diff options
Diffstat (limited to 'src/kernel/linker.ld')
-rw-r--r-- | src/kernel/linker.ld | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/src/kernel/linker.ld b/src/kernel/linker.ld index 6461b2b..3e209fc 100644 --- a/src/kernel/linker.ld +++ b/src/kernel/linker.ld @@ -1,25 +1,24 @@ -OUTPUT_FORMAT("binary") ENTRY(start) -phys = 0x00100000; -SECTIONS -{ - .text phys : AT(phys) { - code = .; - *(.text) - *(.rodata*) - . = ALIGN(4096); - } - .data : AT(phys + (data - code)) - { - data = .; - *(.data) - . = ALIGN(4096); - } - .bss : AT(phys + (bss - code)) - { - bss = .; - *(.bss) - . = ALIGN(4096); - } - end = .; -} +OUTPUT_FORMAT(elf32-i386) + +SECTIONS { + . = 0xC0100000; + + .text : AT(ADDR(.text) - 0xC0000000) { + *(.text) + *(.rodata*) + } + + .data ALIGN (0x1000) : AT(ADDR(.data) - 0xC0000000) { + *(.data) + } + + .bss : AT(ADDR(.bss) - 0xC0000000) { + _sbss = .; + *(COMMON) + *(.bss) + _ebss = .; + } + + end = .; +}
\ No newline at end of file |