From 5443567733f00e8217731c1241f565025e6f4c9e Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 17 Nov 2020 22:38:16 +0100 Subject: I think this fixes quite many bugs! For real though! First tests show no weird bugs anymore. --- kernel/link.ld | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 kernel/link.ld (limited to 'kernel/link.ld') 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 = .; +} -- cgit v1.2.3