Binary translation


binary translation (binary translation) is a technology directly translated to execute binary procedures, which can translate binary programs on a processor to another processor. Implementation. It makes it easy to transplant between the binaries between different processors to expand the scope of hardware / software, helping to break the processor and support software between the previously mentioned processors and support software affecting innovation.

Binary translation


Based on software-based binary translation, it can be divided into three categories: interpretation, static translation, dynamic translation.

1. Interpretation Performs the real-time interpretation of each instruction in the source processor code, the system does not save the interpretation of the explanation, no user interference, no optimization, the interpreter is relatively It is easy to develop, it is easier to be highly compatible with the old architecture, but the code execution efficiency is poor.

2. Static translation is to translate it before the source processor code is executed, and the binary executable file A on the source machine is fully translated into a binary executable program file B on the target machine, and then Executing the program on the target B. The result of the translation can be used multiple times. The static translator offline translation program, there is enough time to perform more complete and meticulous optimization, the code execution is high. However, the static translator cannot solve well Self-modifying code, indirect procedure calls, and indirect jumps, requires support for interpreter; and static translators require the participation of end users, which gives users a very inconvenience.

3. Dynamic translation translates to the executed segment when the program is running, overcoming some of the shortcomings of static translations -, if you can't know the register or memory of the register or memory in the control stream, Code excavation cannot be achieved; dynamic translation can also solve the problem of self-modifying code in most actual conditions, and this is impossible in static translation [14]; dynamic translation can use dynamic information to excavate the static compiler Optimization opportunities found; dynamic translators can be completely transparent to users without user intervention.

Related Articles