Diablo Is A Better Link-time Optimizer

Diablo is a retargetable link-time binary rewriting framework. While our focus has been mostly on program compaction, binary rewriting has a much broader range of applications: speed optimizations, power consumption optimizations, size optimizations, program obfuscation and watermarking, instrumentation, etc.
A good binary rewriting framework (one like Diablo :-)) is also very useful for program analysis and understanding. For instance, Diablo can print out the control flow graph for all functions in a program, annotated with for example liveness information.
Click here to see some results about the compaction Diablo achieves for different programs.
There are a lot of other binary rewriters for different architectures (see the links section of this web site). Here are some things that set Diablo apart from these tools:
  • Diablo is a rewriting linker: its inputs are the object files and libraries from which the program is built, instead of just the program executable. A drawback of this approach is that Diablo is not useful for things like binary translation, where binary programs are translated to run on a completely different architecture.
  • Diablo is safe: because of the extra information that is available at link time (in particular relocation information), it is possible to correctly interpret the complete binary, something that is not always possible without this information.
  • Diablo is retargetable. At the moment, ports exist for the ARM, i386 and PowerPC (32 & 64 bits) architectures. In the past, it has also supported MIPS, Alpha, IA64 and x86_64. A partial port for the CellBE is also available.
Diablo is a prototype tool, intended primarily for research. As such, we cannot guarantee it to be production-quality code, even though we have an extensive collection of regression tests that try to ensure Diablo is as bug-free as possible. There are some caveats in using Diablo:
  • Diablo only works on statically linked programs. We are looking into supporting dynamically linked programs, but support for this is not yet completed.
  • Diablo actually needs a little more information about a program than most standard tool chains provide. If you want to use Diablo on programs generated by a GCC-based tool chain, you need to apply some patches to your tool chain first. These patches do not influence the code that is generated, they just preserve some information about the code and data that would otherwise be lost after compilation. These patches can be downloaded from this web site. Alternatively, we offer a number of precompiled toolchains for different architectures with the patches already applied.
  • Of course, Diablo comes without any warranty! Use it at your own risk. Don't blame us if you use it to optimize some mission-critical piece of software that fails afterwards :-)
If Diablo doesn't work for you, or you have some suggestions for future versions, we'd like to hear from you! Please contact us.

Recently added/changed:

More articles ...