hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 52f1525c420c02a7eaeb91b6525045adfc87ea08
parent d120be2a911f6d1304056598af2940dae862b920
Author: Drew DeVault <sir@cmpwn.com>
Date:   Sun, 24 Oct 2021 10:28:07 +0200

rt: import hare.sc from harec

Signed-off-by: Drew DeVault <sir@cmpwn.com>

Diffstat:
MMakefile | 2+-
Mrt/hare.sc | 17+++++++++++------
2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile @@ -60,7 +60,7 @@ $(TESTCACHE)/hare.ssa: $(hare_srcs) $(hare_testlib_deps) .bin/hare: $(HARECACHE)/hare.o @mkdir -p .bin @printf 'LD\t$@\n' - @$(LD) -T $(rtscript) --gc-sections -o $@ \ + @$(LD) --gc-sections -T $(rtscript) -o $@ \ $(HARECACHE)/hare.o $(hare_stdlib_deps) .bin/hare-tests: $(TESTCACHE)/hare.o diff --git a/rt/hare.sc b/rt/hare.sc @@ -1,36 +1,41 @@ +PHDRS { + headers PT_PHDR PHDRS; + text PT_LOAD FILEHDR PHDRS; + data PT_LOAD; +} ENTRY(_start); SECTIONS { . = 0x10000; .text : { KEEP (*(.text)) *(.text.*) - } + } :text . = 0x8000000; .data : { KEEP (*(.data)) *(.data.*) - } + } :data .init_array : { PROVIDE_HIDDEN (__init_array_start = .); KEEP (*(.init_array)) PROVIDE_HIDDEN (__init_array_end = .); - } + } :data .fini_array : { PROVIDE_HIDDEN (__fini_array_start = .); KEEP (*(.fini_array)) PROVIDE_HIDDEN (__fini_array_end = .); - } + } :data .test_array : { PROVIDE_HIDDEN (__test_array_start = .); KEEP (*(.test_array)) PROVIDE_HIDDEN (__test_array_end = .); - } + } :data .bss : { KEEP (*(.bss)) *(.bss.*) - } + } :data }