Write JITLink support for a new format/architecture

JITLink is LLVM’s new JIT linker API – the low-level API that transforms compiler output (relocatable object files) into ready-to-execute bytes in memory. To do this JITLink’s generic linker algorithm needs to be specialized to support the target object format (COFF, ELF, MachO), and architecture (arm, arm64, i386, x86-64). LLVM already has mature implementations of JITLink for MachO/arm64 and MachO/x86-64, and a relatively new implementation for ELF/x86-64. Write a JITLink implementation for a missing target that interests you. If you choose to implement support for a new architecture using the ELF or MachO formats then you will be able to re-use the existing generic code for these formats. If you want to implement support for a new target using the COFF format then you will need to write both the generic COFF support code and the architecture support code for your chosen architecture.

Expected results

Write a JITLink specialization for a not-yet-supported format/architecture.

Desirable skills

Intermediate C++; Understanding of LLVM and the LLVM JIT in particular; familiarity with your chosen format/architecture, and basic linker concepts (e.g. sections, symbols, and relocations).

Project type

Large

Mentors

@vvassilev, @lhames

Hello, I’m a student interested in adding implementation for ELF/risc-v. However under llvm-project/llvm/lib/ExecutionEngine/JITLink at main · llvm/llvm-project · GitHub I found some files related to risc-v, and class ELFJITLinker_riscv is implemented in ELF_riscv.cpp.
Is the implementation for ELF/risc-v incomplete yet? I found some discussion at Any plan to implement JIT for RISC-V ?, so I’m wondering is there any update after that.

Hi Jianyu,

I found some discussion at Any plan to implement JIT for RISC-V ?, so I’m wondering is there any update after that.

An ELF backend has already been largely implemented by @luxufan, so it is not an option for GSoC.