nuttx
nuttx copied to clipboard
Support LLVM linked ELF RISC-V executable
Summary
I tried to use LLVM to build my executable, but it crashed always. Then I found it did't implement some relocation.
Impact
Implement R_RISCV_BRANCH / R_RISCV_JAL / R_RISCV_RVC_JUMP / R_RISCV_RVC_BRANCH
Testing
#include <stdio.h>
int main(int argc, char const* argv[])
{
printf("Hello world\n");
return 0;
}
clang -Os --target=riscv32-esp-elf -march=rv32imc -mabi=ilp32 -Wl,-e,main,-r,-T,binfmt/libelf/gnu-elf.ld
@metarutaiga please squash into one patch.
Hi @metarutaiga, nice to see you working on it again.
Please note that now all commits need to be signed (git commit -s)