Commit Graph

16 Commits

Author SHA1 Message Date
David Nadlinger efbae51f9d runtime: Validate ksupport ELF against hard-coded address ranges
This would have caught the reduction in header padding with LLD 14.
In theory, we could just get rid of the hard-coded kernel CPU address
ranges altogether and use ksupport.elf as the one source of truth; the
code already exists in dyld. The actual base address of the file would
still need to be forwarded to the kernel-side libunwind glue, though,
as there doesn't seem to be a clean way to get the equivalent of
KSUPPORT_HEADER_SIZE through the linker script. I have left this as-is
with the hard-coded KERNELCPU_… constants for now.
2023-08-07 10:10:38 +00:00
occheung f79f7db3a2 dyld: handle rebind on symbols relocated by CALL_PLT 2022-06-01 12:44:33 +08:00
occheung 872f8f039f dyld: support additional RV32 reloc types
The support of LO12 type requires the runtime linker to find the corresponding HI20 symbol. resolve_rela needs the entire relocation section for that.
2022-06-01 12:44:33 +08:00
occheung 50495097e5 dyld: rename pltrel to jmprel
nac3ld will not generate PLT & its relocation section. There might not be a pltrel in that case.
On the other hand, rebinding will not be limited to the symbols in the PLT when linked with nac3ld.
Thus the renaming.
2022-06-01 12:44:33 +08:00
occheung 531670d6c5 dyld: check ABI 2021-11-08 16:59:08 +08:00
occheung d8ac429059 dyld: streamline lib.rs
Only riscv32 is supported anyway, no need to have excessive architecture check.
2021-09-10 13:25:12 +08:00
occheung eecd825d23 firmware: suppress warning 2021-09-10 13:25:12 +08:00
occheung 61b0170a12 firmware: purge or1k 2021-09-10 13:25:12 +08:00
occheung bfddd8a30f libdyld: add riscv support 2021-09-10 13:20:31 +08:00
whitequark b8b9fa51bd libdyld: accept objects with no rela relocations. 2019-06-17 06:43:34 +00:00
whitequark e5796e26e1 firmware: remove unused #![feature(untagged_unions)]. 2018-05-15 15:05:19 +00:00
whitequark 1e896d4ba8 firmware: fix warnings. 2018-01-17 00:48:46 +00:00
whitequark db494967c5 firmware use Rust 0.18.0. 2017-04-19 09:38:24 +00:00
whitequark 5d3b00cf12 Implement recording of DMA traces on the core device. 2017-02-26 02:50:20 +00:00
whitequark 13c6e96760 firmware: implement dyld::Library::rebind. 2017-02-25 00:10:40 +00:00
whitequark 04ad267055 firmware: rewrite the dynamic linker in Rust. 2017-02-24 18:57:29 +00:00