Qian Matteo Chen 4e2eec0380 [NewMFP] Forward the GraphType to RPOTE
RPOTE let's us specify the specific GraphTraits needed
This commits adds a template parameter LGT that specifies
the GraphTraits of the Label (the nodes of our flow graph).

This LGT can be distict from GraphType because,
while most of the llvm graphs are structured so that
nodes of a graph are subgraphs of the same type as
the parent graph, it is not true sometimes
2021-06-08 15:01:02 +02:00
2021-05-14 13:45:00 +02:00
2021-06-08 15:01:02 +02:00
2021-05-06 15:42:16 +02:00
2021-05-26 18:07:04 +02:00
2020-11-13 09:59:42 +01:00
2020-11-09 08:52:51 +01:00
2021-03-06 16:55:40 +01:00

*******
Purpose
*******

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

************
How to build
************

``revng`` employs CMake as a build system.
In order to build ``revng``, use orchestra:

    https://github.com/revng/orchestra

To run the test suite simply, from the build directory, run:

.. code-block:: sh

    # Enter in the build directory
    orc shell -c revng

    # Run the tests
    ctest -j$(nproc)

***********
Example run
***********

The simplest possible example consists in the following:

.. code-block:: sh

    # Install the ARM toolchain
    orc install toolchain/arm/gcc

    # Enter in the build directory
    orc shell -c revng

    # Build programs (skip building test material)
    ninja revng-all-binaries

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

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

    # Compile
    armv7a-hardfloat-linux-uclibceabi-gcc \
      -Wl,-Ttext-segment=0x20000 \
      -static hello.c \
      -o hello.arm

    # Translate
    ./bin/revng translate hello.arm

    # Run translated version
    ./hello.arm.translated
    # Hello, world!
S
Description
Automated archival mirror of github.com/revng/revng
Readme GPL-2.0 24 MiB
Languages
C++ 77.1%
Python 12.6%
MLIR 4.4%
CMake 1.9%
LLVM 1.4%
Other 2.5%