From d43c1af88b1834a00f8b5f09aa0af1a5e4f5b4aa Mon Sep 17 00:00:00 2001 From: dzwdz Date: Mon, 18 Jul 2022 14:01:21 +0200 Subject: user: a super primitive ELF loader holy shit. this was simpler than i expected it to be --- src/usertestelf.ld | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/usertestelf.ld (limited to 'src/usertestelf.ld') diff --git a/src/usertestelf.ld b/src/usertestelf.ld new file mode 100644 index 0000000..2567f77 --- /dev/null +++ b/src/usertestelf.ld @@ -0,0 +1,23 @@ +ENTRY(main) + +SECTIONS +{ + . = 8M; + .text BLOCK(4K) : ALIGN(4K) + { + *(.text) + } + .rodata BLOCK(4K) : ALIGN(4K) + { + *(.rodata) + } + .data BLOCK(4K) : ALIGN(4K) + { + *(.data) + } + .bss BLOCK(4K) : ALIGN(4K) + { + *(COMMON) + *(.bss) + } +} -- cgit v1.2.3