QTechOS/kernel/arch/riscv/platform/allwinner-d1/platform.ld
Quantum b35d58df1f
Build System: More better
Split code into generic, arch, and platform

Made QEMU its own platform

Added shitty uart upload script for lichee board until I can get fel to
actually upload uboot payloads without hanging

TODO: Move platform selection out of build script

TODO: Move arch specific stuff from kernel to arch

TODO: Common linker script for arch instead of having a copy in each
platform
2022-01-04 01:50:46 -05:00

25 lines
570 B
Text

OUTPUT_ARCH("riscv")
OUTPUT_FORMAT("elf64-littleriscv")
ENTRY(_start)
SECTIONS {
/* R-X segment. */
. = 0x45000000;
.text : { *(.text) *(.text.*) }
/* R-- segment. */
. = ALIGN(0x1000) + (. & (0xFFF));
/* For some reason, ld does not emit a read-only segment without an additional gap. */
. += 0x1000;
.rodata : { *(.rodata) *(.rodata.*) }
.note.gnu.build-id : { *(.note.gnu.build-id) }
/* RW- segment. */
. = ALIGN(0x1000) + (. & (0xFFF));
.data : { *(.data) *(.data.*) }
.got : { *(.got) }
.got.plt : { *(.got.plt) }
.bss : { *(.bss) *(.bss.*) }
}