From 642b5fb0007b64c77d186fcb018d571152ee1d47 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Mon, 14 Aug 2023 18:51:07 +0200 Subject: reorganization: first steps --- src/bootstrap/linker.ld | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/bootstrap/linker.ld (limited to 'src/bootstrap/linker.ld') diff --git a/src/bootstrap/linker.ld b/src/bootstrap/linker.ld new file mode 100644 index 0000000..10e3f98 --- /dev/null +++ b/src/bootstrap/linker.ld @@ -0,0 +1,31 @@ +ENTRY(_start) + +SECTIONS +{ + . = 0x20000; + _bss_start = .; + .bss BLOCK(4K) : ALIGN(4K) + { + *(COMMON) + *(.bss) + } + _bss_end = .; + + . = 2M; + .text BLOCK(4K) : ALIGN(4K) + { + /* the assert needs to be inside of a section or it'll be a syntax error */ + ASSERT(_bss_end <= 2M, "bss too big, needs to be moved down"); + *(.text.startup) + *(.text) + } + .rodata BLOCK(4K) : ALIGN(4K) + { + *(.rodata) + } + .data BLOCK(4K) : ALIGN(4K) + { + *(.data*) + } + _initrd = .; /* is just appended onto the end of the binary */ +} -- cgit v1.2.3