Conversation
Modify the 'update-snapshots' and 'check-snapshots' make targets to include generation and validation of new snapshots for the RISC-V architecture using dynamic linking.
The update workflow now downloads a RISC-V GNU toolchain to provide necessary dependencies and validate the dynamically linked compiler targeting the RISC-V architecture.
|
As the The updated GitHub Actions also downloads the 32-bit variant to validate RISC-V dynamic linking. |
Evaluate Run 32-bit applications on 64-bit Linux kernel, which is exactly RV32-on-RV64 userspace compatibility, not emulation. |
I'm not sure whether I understand correctly. Do you mean that the proposed changes should be verified on a RISC-V machine? |
See sysprog21/kbox#18 |
The proposed changes primarily improve the ELF generation and the RISC-V backend, enabling the build system to generate a dynamically linked shecc targeting the RISC-V architecture.
Although the current changes allow both bootstrapping and test suite to complete successfully, this is still a work in progress. The TODO items are listed as follows:
riscv-abi.sh) to validate the RISC-V ABI.arm.mkandriscv.mkinto a common build logic (e.g.: configureRUNNER_LD_PREFIX).Summary by cubic
Adds dynamic linking support for RISC-V (rv32). The compiler now emits RELA-based PLT/GOT, calls external functions via PLT, and starts via __libc_start_main; CI and build updates validate dynamic RV32 builds.
New Features
.rela.plt, RELA entries, and RV32 GOT/PLT sizes; reserve 2 GOT slots for the resolver/link_map.use_relapltflag, add arch constants, and emit correct dynamic tags/headers; initialize.gotusingRESERVED_GOT_NUM.DYNLINK=1for RISC-V, add RV32 dynamic snapshots, and run static/dynamic matrices for ARM and RISC-V.Dependencies
mk/riscv.mklocatesld-linuxand setsRUNNER_LD_PREFIXunder QEMU for dynamic runs.Written for commit 446b538. Summary will update on new commits.