Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support LLVM linked ELF RISC-V executable #13197

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

metarutaiga
Copy link

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 metarutaiga changed the title Support LLVM linked ELF executable Support LLVM linked ELF RISC-V executable Aug 27, 2024
@xiaoxiang781216
Copy link
Contributor

@metarutaiga please squash into one patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants