Code reengineering tool for ELF/MIPS binaries

ReMIPS is a tool that manipulates binaries in an automated fashion, applying code reengineering techniques. It consists of six stages, where an arbitrary number of modules, each implementing a well-defined functionality, are applied. As such, the output of each stage is served as input to the next stage, and the output from the last stage is the final result.

The goal is to have a tool capable of modifying binaries directly, so allowing compiler and code-generator developers to study the interaction of different techniques. For example, one may be interested in the study of optimization techniques interaction, which might result in low-quality code. However, carrying out such an experiment can be very time consuming, specially if compiling from scratch for a huge amount of scenarios.

Currently ReMIPS is targetted to the ELF object file format, and the MIPS architecture. The modular approach will hopefully ease the inclusion of further functionalities.

It is licensed under the new (or revised) 3-clause BSD license template.

For recent changes, please refer to the news page, whereas if you'd like more in-depth (developer-targetted) news, please refer to the ChangeLog.


You'll need:

  • An STL C++ compiler (GNU GCC).

  • UNIX-like environment (BSD or Linux).

  • Make tool (BSD Make or GNU Make).

ReMIPS is known to compile and work with with GCC-3.4.4, under FreeBSD 6.1. If it doesn't compile/work under some kind of Linux distribution or other compiler, don't hesitate to file a bug report.


Although a previous prototype works, ReMIPS is being ported to C++ to allow further development, in a easier way. Because of this, ReMIPS is currently very limited in that it can do.

ReMIPS is currently only able to identify ELF object files, and as such is of not much usefulness. Stay tunned, as there are plenty of updates coming.


As the project was just approved for inclusion in, there aren't any releases yet. However, you can download it from the Subversion repository:

svn checkout  remips

This will create a directory named remips with the latest changes. There isn't any branches or tags right now.


Hopefully, this is the easiest part — you should just type make. This is an actual screenshot of the compilation:

% make
==== elf_id.o ====
g++ -g -W -Wall -O0  -c
==== elf32_dec.o ====
g++ -g -W -Wall -O0  -c
==== main.o ====
g++ -g -W -Wall -O0  -c
==== Linking: remips ====
g++ -o remips elf_id.o  elf32_dec.o  main.o


As of now, running ReMIPS is trivial:

% ./remips input
ELF32/64 Identifier: detected ELF32 file format

The only accepted parameter is the input filename, which in this case is named input. As the identification stage is the only one completelly ported, only it is executed. The input is an ELF binary, as can be seen in this output:

% file input
input: ELF 32-bit MSB executable, MIPS, version 1 (SYSV), statically linked, not stripped

The compiler used to generate it was MIPS® SDE Lite (version 6.03.00 for Linux, at the time). It worked out-of-the-box in a FreeBSD environment, but only for simple programs (e.g., programs that don't depend on anything else, like libs and such).