Tools: binary rewriters and editors

Pin

Saturday, December 22nd, 2007

Pin is a dynamic instrumentation tool. From the website:

Pin is a tool for the dynamic instrumentation of programs. It supports Linux binary executables for Intel (R) Xscale (R), IA-32, IA-32E (64 bit x86), and Itanium (R) processors. It also allow instrumentation of Windows programs on IA-32 and Intel (R) 64 processors

Pin was designed to provide functionality similar to the popular ATOM toolkit for Compaq’s Tru64 Unix on Alpha, i.e. arbitrary code (written in C or C++) can be injected at arbitrary places in the executable. Unlike Atom, Pin does not instrument an executable statically by rewriting it, but rather adds the code dynamically while the executable is running. This also makes it possible to attach Pin to an already running process.

Pin provides a rich API that abstracts away the underlying instruction set idiosyncrasies and allows context information such as register contents to be passed to the injected code as parameters. Pin automatically saves and restores the registers that are overwritten by the injected code so the application continues to work. Limited access to symbol and debug information is available as well.

PearColator

Wednesday, October 27th, 2004

The APT group at Manchester have released PearColator, which is a dynamic binary translator based on the Jikes RVM and licensed under the IBM CPL. PearColator converts PPC binaries to the Jikes IR, performs optimizations, and recompiles them for the host architecture. As a result, all of the optimizations supported by Jikes are available. PearColator is implemented in Java.

The alto Project Home Page: Link-time Code Optimization

Thursday, April 1st, 2004

The alto project from Arizona is a whole-program, link-time optimizer for the DEC Alpha, enabling optimization and specialization of library routines to their call sites.

Thanks to Manoj Plakal for the link.

WARTS — the Wisconsin Architectural Research Tool Set

Thursday, April 1st, 2004

Thanks to Manoj Plakal for a link to WARTS, a toolset developed at Wisconsin. WARTS includes the Executable Editing Library (EEL), which enables analysis and modification of SPARC Solaris executable programs using a C++ API. Distributed with the library are two tools built on EEL — a path profiler and an instruction count profiler. The path profiler is based on the technique described in Efficient Path Profiling by Thomas Ball and James Larus (ps link).

WARTS also includes a framework for memory system simulators, a cache profiler, two cache simulators, and the Wisconsin Wind Tunnel simulator.

DAISY — Architecture Emulation thru Dynamic Compilation

Thursday, April 1st, 2004

DAISY is a dynamic recompiler that translates PowerPC executables into VLIW code on-the-fly, a page at a time, following program execution. It is implemented in C, runs on AIX/PPC machines, and includes a simulator for the DAISY VLIW architecture. Apparently, it can deal with self-modifying code, precise exceptions, and other thorny issues.