diff options
Diffstat (limited to 'kernel/link.ld')
-rw-r--r-- | kernel/link.ld | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/kernel/link.ld b/kernel/link.ld new file mode 100644 index 0000000..0d8d865 --- /dev/null +++ b/kernel/link.ld @@ -0,0 +1,30 @@ +OUTPUT_FORMAT("binary") +OUTPUT_ARCH(i386) +ENTRY(kernel_main) +phys = 0x00050000; + +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 = .; +} |