Skip to content
revng: the core repository of the rev.ng project (mirror)
Branch: master
View #4
Clone or download
#4 Compare This branch is 1 commit ahead, 212 commits behind develop.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
argparse
docs
scripts
tests
CMakeLists.txt
CREDITS.md
Doxyfile.in
LICENSE.gpl
LICENSE.md
LICENSE.mit
README.rst
binaryfile.cpp
binaryfile.h
codegenerator.cpp
codegenerator.h
collectcfg.cpp
collectcfg.h
collectfunctionboundaries.cpp
collectfunctionboundaries.h
collectnoreturn.cpp
collectnoreturn.h
commonconstants.h
csv-to-ld-options
datastructures.h
debug.cpp
debug.h
debughelper.cpp
debughelper.h
dump.cpp
early-linked.c
externaljumpshandler.cpp
externaljumpshandler.h
functionboundariesdetection.cpp
functionboundariesdetection.h
functioncallidentification.cpp
functioncallidentification.h
generatedcodebasicinfo.cpp
generatedcodebasicinfo.h
instructiontranslator.cpp
instructiontranslator.h
ir-helpers.h
isolatefunctions.cpp
isolatefunctions.h
iteratorwrapper.h
jumptargetmanager.cpp
jumptargetmanager.h
lazysmallbitvector.h
main.cpp
memoryaccess.h
merge-dynamic.py
noreturnanalysis.cpp
noreturnanalysis.h
osra.cpp
osra.h
ptcdump.cpp
ptcdump.h
ptcinterface.h
rai.h
range.h
reachingdefinitions.cpp
reachingdefinitions.h
revamb.h
set.cpp
set.h
simplifycomparisons.cpp
simplifycomparisons.h
stackanalysis.cpp
stackanalysis.h
stackanalysis_impl.h
subgraph.h
support.c
support.h
transformadapter.h
translate
variablemanager.cpp
variablemanager.h

README.rst

Purpose

revamb is a static binary translator. Given a input ELF binary for one of the supported architectures (currently MIPS, ARM and x86-64) it will analyze it and emit an equivalent LLVM IR. To do so, revamb employs the QEMU intermediate representation (a series of TCG instructions) and then translates them to LLVM IR.

How to build

revamb employs CMake as a build system. The build system will try to automatically detect the QEMU installation and the GCC toolchains require to build the test binaries.

If everything is in standard locations, you can just run:

mkdir build/
cd build/
cmake ..
make -j$(nproc)
make install

For further build options and more advanced configurations see docs/BuildSystem.rst (TODO: reference).

To run the test suite simply run:

make test

Example run

The simplest possible example consists in the following:

cd build
cat > hello.c <<EOF
#include <stdio.h>

int main(int argc, char *argv[]) {
  printf("Hello, world!\n");
}
EOF
armv7a-hardfloat-linux-uclibceabi-gcc -static hello.c -o hello.arm
./translate hello.arm
# ...
./hello.arm.translated
Hello, world!
You can’t perform that action at this time.