Tux-UKUUG logo
UKUUG Linux Developers' Conference
Linux 2002
---------------------------------------------------
4 - 7 July 2002
Bristol

Mark Probst (Austria)

Dynamic Binary Translation

Binary translation is the process of transforming a binary program (executable) from one machine language to another. Static binary translation does this for a whole program at one, like a traditional compiler, while dynamic binary translation does it on-the-fly. A particularly prominent example of dynamic binary translation is the Transmeta Crusoe, which dynamically compiles x86 machine code to a proprietary VLIW machine code.

This paper presents the main issues of dynamic binary translation and their solutions with the example of bintrans - a dynamic binary translator written by the author as part of his dissertation.

Among the things discussed are:

  • Instruction selection. How are machine instructions mapped to another architecture? Most difficulties arise when compiling from an architecture with semantically rich instructions, like the x86 or the PowerPC. For example, we use 6 different target instruction sequences for the single PowerPC instruction "rlwinm".
  • Register mapping. What do we do if the source architecture has more registers than the target architecture? What about different register widths?
  • Endianness. How to deal with the problem of the source architecture using a different byte-order than the target machine.
  • Self-modifying code. Machine code can modify itself. This presents a problem to dynamic binary translators, since they keep a cache of already translated code fragments. How can we detect self-modifying code and what do we do about it?

About bintrans: Bintrans in its current stage can run various SPECINT95 and SPECFP95 benchmarks compiled for the PowerPC and the x86 on the Alpha under Linux. It even runs a simple X11 real-time strategy game (XBattle). It's stable and playable. We hope to release bintrans under the GPL soon. There are no licensing issues - it just needs some cleaning up in order to be of any use to anybody. It will be released at the time of the conference.


Programme Timetable Dinner Call for Papers
Location Accommodation Booking Form Exhibition


S  P O N S O R S
IBM
IBM developerWorks
Sony PlayStation 2
Sony PlayStation 2
Sistina Software
Sistina Software
  Astaro Network Firewall
Astaro Network Firewall
 
AMD
AMD
Perforce
Perforce
Borland
Borland

M  E D I A   S  P O N S O R S
OSDN
OSDN
Linux Magazine
Linux Magazine
Linux User
Linux User
Linux Format
Linux Format
Need To Know
NTK

For more information please contact UKUUG Problems? e-mail webmaster
© Copyright 2002 UKUUG Ltd