Explore the code

The code of rev.ng is available on GitHub. Feel free to open issues or create pull requests there. Make sure you check out the overview of our repositories.

Building rev.ng

To build rev.ng you need to use orchestra, the repository that takes care of building from source (or download precompiled verions) of all the required dependencies.

The shortest way to obtain a working copy of rev.ng is the following:

git clone https://github.com/revng/orchestra
cd orchestra

# For Debian-based distributions
sudo support/install-dependencies.sh

# Remove architectures you're not interested in
# The available options are: arm i386 x86-64 mips mipsel s390x aarch64
# Comment to install all the available toolchains
export DEFAULT_TOOLCHAINS="arm i386 x86-64"

# Uncomment if you prefer to build from source

# Install everything in orchestra/root and run rev.ng's test suite
make test-revng install-revng

Note that this command will download binary versions of several toolchains that can take quite some disk space (currently up to 12GB). You can limit the set of toolchains by filtering the DEFAULT_TOOLCHAINS variable.

Installing everything from source (BINARY_COMPONENTS="") will take considerably longer and much more space.

orchestra offers many more configuration options. To find out more check out README.md.

Translate a test program

# Prepare the environment for using rev.ng
. ./environment

# Create a simple hello world program
cat > hello.c <<EOF
#include <stdio.h>

int main(int argc, char *argv[]) {
  printf("Hello, world!\n");

# Compiler for with different compilers
armv7a-hardfloat-linux-uclibceabi-gcc -static hello.c -o hello.arm
i386-gentoo-linux-musl-gcc -static hello.c -o hello.i386
x86_64-gentoo-linux-musl-gcc -static hello.c -o hello.x86-64

# Translate with rev.ng
revng translate hello.arm
revng translate hello.i386
revng translate hello.x86-64

# Test the translated programs

You can also give a try to a more sophisticated example:

wget 'https://rev.ng/downloads/ls-ubuntu-16.04'
revng translate ls-ubuntu-16.04
./ls-ubuntu-16.04.translated -lh
Why don't you subscribe to our newsletter?
rev.ng Srls - P. IVA: IT02776470359 - Via San Martino 23 - 42121 - Reggio Emilia, Italy -
Twitter - GitHub - Privacy policy
This website doesn't use JavaScript, cookies and it's fully statically generated (inspiration).