You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to make an UEFI application for RISC-V, but the rustc seems to ICE. @repnop tracked the issue down here, where it errors out when RISC-V architecture set for COFF images with unimplemented architecture Riscv64 with sub-architecture None.
As RISC-V is a completely valid and sound UEFI target which requires PE/COFF, this is rather unpleasant.
The text was updated successfully, but these errors were encountered:
Unfortunately Microsoft hasn't yet defined any COFF relocations for riscv. As such it is not possible to produce riscv COFF object files. LLVM can't write them either. It just so happens that rustc gave an error first while creating an object file for the crate metadata. AFAIK you have to link an ELF instead and then transform this ELF into a PE executable. For example by prepending a stub written in assembly like https://github.com/torvalds/linux/blob/master/arch/riscv/kernel/efi-header.S
Yes, you need to create an ELF first and transform it. I have previously add some RISC-V support to the elftoefi example in this crate, but I only tested it on a simple file and it may not be complete.
I am trying to make an UEFI application for RISC-V, but the
rustc
seems to ICE. @repnop tracked the issue down here, where it errors out when RISC-V architecture set for COFF images withunimplemented architecture Riscv64 with sub-architecture None
.As RISC-V is a completely valid and sound UEFI target which requires PE/COFF, this is rather unpleasant.
The text was updated successfully, but these errors were encountered: