Below we provide an archive containing the ls program compiled for ARM, MIPS and x86-64, along with the result of the revamb translation process, i.e., the same three binaries translated to x86-64.

Specifically the following files are available:

ls.{arm,mips,x86-64}
The ls program compiled for the respective architecture. All the programs are statically linked.
ls.*.ll
The LLVM IR generated by revamb, ready to be compiled.
ls.*.translated
The ls.*.ll files compiled for x86-64, without optimization.
ls.*.translated.O2
The ls.*.ll files compiled for x86-64, optimized with -O2 (both with opt and llc).

Download

Troubleshooting

To be able to run ARM binaries you have to be able to mmap pages at low addresses. If you get a SEGFAULT run (as root):

echo 4096 > /proc/sys/vm/mmap_min_addr

Example session

$ file ls.arm ls.mips ls.x86-64
ls.arm:    ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, not stripped
ls.mips:   ELF 32-bit MSB executable, MIPS, MIPS-I version 1 (SYSV), statically linked, not stripped
ls.x86-64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped
$ file ls.*.translated*
ls.arm.translated:       ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, not stripped
ls.arm.translated.O2:    ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, not stripped
ls.mips.translated:      ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, not stripped
ls.mips.translated.O2:   ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, not stripped
ls.x86-64.translated:    ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, not stripped
ls.x86-64.translated.O2: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, not stripped
$ ./ls.arm.translated
ls.arm     ls.arm.translated     ls.mips     ls.mips.translated     ls.x86-64     ls.x86-64.translated
ls.arm.ll  ls.arm.translated.O2  ls.mips.ll  ls.mips.translated.O2  ls.x86-64.ll  ls.x86-64.translated.O2
$ ./ls.mips.translated
ls.arm     ls.arm.translated     ls.mips     ls.mips.translated     ls.x86-64     ls.x86-64.translated
ls.arm.ll  ls.arm.translated.O2  ls.mips.ll  ls.mips.translated.O2  ls.x86-64.ll  ls.x86-64.translated.O2
$ ./ls.x86-64.translated
ls.arm     ls.arm.translated     ls.mips     ls.mips.translated     ls.x86-64     ls.x86-64.translated
ls.arm.ll  ls.arm.translated.O2  ls.mips.ll  ls.mips.translated.O2  ls.x86-64.ll  ls.x86-64.translated.O2