d901203 / rv2llvm

Static Binary Translator RISC-V to LLVM IR

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rv2llvm

rv2llvm is a tool for translating RISC-V ELF files to LLVM IR. This project implements static binary translation, making it possible to run RISC-V ELF on different architecture systems.

Demo

demo.gif

Features

  • Translation of RISC-V ELF files to LLVM IR
  • Implementation of static binary translation
  • Support for Clang to translate LLVM IR to native architecture ELF
  • Written in Go and llir

Requirements

  • Go
  • Clang-14
  • RISC-V ELF files (some test cases are in the tests and build folder)

Installation

git clone https://github.com/d901203/rv2llvm
cd rv2llvm
make

Usage

cd build
  1. Translate RISC-V ELF to LLVM IR: ./rv2llvm [RISC-V ELF FileName]
  2. Translate LLVM IR to native architecture ELF: clang [LLVM IR FileName]

About

Static Binary Translator RISC-V to LLVM IR


Languages

Language:Go 99.8%Language:Makefile 0.2%