nuttx icon indicating copy to clipboard operation
nuttx copied to clipboard

Support LLVM linked ELF RISC-V executable

Open metarutaiga opened this issue 1 year ago • 2 comments

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 avatar Aug 27 '24 03:08 metarutaiga

@metarutaiga please squash into one patch.

xiaoxiang781216 avatar Aug 27 '24 17:08 xiaoxiang781216

Hi @metarutaiga, nice to see you working on it again.

Please note that now all commits need to be signed (git commit -s)

acassis avatar May 07 '25 12:05 acassis