Binary translation: static, dynamic, retargetable? (original) (raw)

A Retargetable Static Binary Translator for the ARM Architecture

ACM Transactions on Architecture and Code Optimization, 2014

Machines designed with new but incompatible Instruction Set Architecture (ISA) may lack proper applications. Binary translation can address this incompatibility by migrating applications from one legacy ISA to a new one, although binary translation has problems such as code discovery for variable-length ISA and code location issues for handling indirect branches. Dynamic Binary Translation (DBT) has been widely adopted for migrating applications since it avoids those problems. Static Binary Translation (SBT) is a less general solution and has not been actively researched. However, SBT performs more aggressive optimizations, which could yield more compact code and better code quality. Applications translated by SBT can consume less memory, processor cycles, and power than DBT and can be started more quickly. These advantages are even more critical for embedded systems than for general systems. In this article, we designed and implemented a new SBT tool, called LLBT, which translates ...

Retargetable and reconfigurable software dynamic translation

International Symposium on Code Generation and Optimization, 2003. CGO 2003.

Software dynamic translation (SDT) is a technology that permits the modification of an executing program's instructions. In recent years, SDT has received increased attention, from both industry and academia, as a feasible and effective approach to solving a variety of significant problems. Despite this increased attention, the task of initiating a new project in software dynamic translation remains a difficult one. To address this concern, and in particular, to promote the adoption of SDT technology into an even wider range of applications, we have implemented Strata, a cross-platform infrastructure for building software dynamic translators. This paper describes Strata's architecture, our experience retargeting it to three different processors, and our use of Strata to build two novel SDT systemsone for safe execution of untrusted binaries and one for fast prototyping of architectural simulators.

SIND: A framework for binary translation

2001

Recent work with dynamic optimization in platform independent, virtual machine based languages such as Java has sparked interest in the possibility of applying similar techniques to arbitrary compiled binary programs. Systems such as Dynamo, DAISY, and FX¢ 32 exploit dynamic optimization techniques to improve performance of native or foreign architecture binaries. However, research in this area is complicated by the lack of openly licensed, freely available, and platform-independent experimental frameworks. SIND aims to fill this void by providing a easily-extensible and flexible framework for research and development of applications and techniques of binary translation. Current research focuses are dynamic optimization of running binaries and dynamic security augmentation and integrity assurance.

A Dynamic Binary Translator in a Java Environment

Dynamic binary translation looks to map one computer architecture to another. Java is unusual in that it compiles to a platform independent bytecode that runs on a virtual machine. This paper shows a dynamic translation and compilation environment that can provide a Java virtual machine (JVM). Furthermore, dynamic compilation has the ability to perform run-time optimisations that are unavailable to a conventional static compiler. A technique is shown that translates Java bytecodes in sympathy with dynamic compiler optimisations. This is done with the aim of rivalling and surpassing static optimisation techniques using dynamic ones. This will enable Java to stay true to its goal of being platform independent and yet running at comparable speeds to statically compiled code. Results from the Dynamite JVM, developed as part of this research, are presented.

Dynamic binary translation and optimization

IEEE Transactions on Computers, 2001

We describe a VLIW architecture designed speci cally as a target for dynamic compilation of an existing instruction set architecture. This design approach o ers the simplicity and high performance of statically scheduled architectures, achieves compatibility with an established architecture, and makes use of dynamic adaptation. Thus, the original architecture is implemented using dynamic compilation, a process we refer to as DAISY Dynamically Architected Instruction Set from Yorktown. The dynamic compiler exploits runtime pro le information to optimize translations so as to extract instruction level parallelism. This work reports di erent design trade-o s in the DAISY system, and their impact on nal system performance. The results show high degrees of instruction parallelism with reasonable translation overhead and memory usage.

An out-of-order execution technique for runtime binary translators

ACM SIGOPS Operating Systems Review, 1998

A dynamic translator emulates an instruction set architccturc by translating source instructions to native code during execution. On statically-scheduled hardware, higher performance can potentially be achieved by reordering the translated instructions; however, this is a challenging transformation if the source architecture supports precise exception semantics, and the user-level program is allowed to register exception handlers. This paper presents a software technique which allows a translator to achieve the out-of-order execution of user-level programs, while preserving all sequential semantics. The design combines a translator, an interpreter, and a set of operating system services. Using the proposed techniques, a dynamic translator can optimistically reorder instructions and speculate them across branch boundaries. If a mispeculated operation causes an exception, the recovery algorithm reverts the application state to a safe point, then retranslates the faulty code without re...

Experiences Constructing a Lightweight SPARC Interpreter for a Dynamic Binary Translator

Dynamic binary translation is an important area for compiler research, because additional information available at runtime can substantially improve the effectiveness of optimizations. The difficulty lies in creating a system capable of gathering runtime information without slowing down the running executable. Several such systems have been created (Dynamo, DynamoRIO, FX!32, etc.), but their use presents several problems to the researcher. They are either closed or proprietary, and are often tied to a very specific platform. In this paper we discuss the design of a new, open, cross-platform dynamic binary translation system, SIND. Specifically we discuss the design in general terms, and then focus on the specific implementation of a lightweight interpreter for the SPARC architecture. We explore the many issues involved in building a selfbootstrapping, efficient interpreter.

Overhead reduction techniques for software dynamic translation

18th International Parallel and Distributed Processing Symposium, 2004. Proceedings., 2004

Software dynamic translation (SDT) is a technology that allows programs to be modified as they are running. The overhead of monitoring and modifying a running program's instructions is often substantial in SDT systems. As a result, SDT can be impractically slow, especially in SDT systems that do not or can not employ dynamic optimization to offset overhead. This is unfortunate since SDT has obvious advantages in modern computing environments and interesting applications of SDT continue to emerge. In this paper, we investigate several overhead reduction techniques, including indirect branch translation caching, fast returns, and static trace formation, that can improve SDT performances significantly.