binary translation

7
BINARY TRANSLATION CODE DISCOVERY PROBLEM DYNAMIC TRANSLATION 1

Upload: sivanantham-s

Post on 12-Apr-2017

21 views

Category:

Engineering


0 download

TRANSCRIPT

Page 1: Binary translation

1

BINARY TRANSLATION

CODE DISCOVERY PROBLEMDYNAMIC TRANSLATION

Page 2: Binary translation

2

BINARY TRANSLATION Process of converting source Binary program into Target Binary program is called Binary Translation Performance is better than Interpretation

Contd. . . . .

Page 3: Binary translation

3

State Mapping is used to map the registers in source ISA to Target ISA Registers After mapping, some target registers are left for accommodating the Emulator code

Page 4: Binary translation

4

CODE DISCOVERY AND DYNAMIC TRANSLATIONCODE DISCOVERY PROBLEM (Three causes)Normally Translation happens statically before executionThere may be some situation when we have a indirect jump to a target instruction stored in a registerRegisters are initialized only during the run timeThere is no guarantee that the jump may lead to a valid instruction

Page 5: Binary translation

5

DYNAMIC & INCREMENTAL TRANSLATION Code discovery is a great problem in Binary Translation

Solution is to translate the binary while the program is operating on actual input data dynamically and to translate new sections of code incrementally when the program reaches them

Major entities in dynamic & incremental translation are•Code Cache (holds most recently translated block of code)•SPC •TPC •Map Table (implemented as a Hash Table)•Interpreter•Translator•Emulation Manager (finds and executes translated code)

Page 6: Binary translation

6

DYNAMIC TRANSLATION SYSTEM AND WORK FLOW

Page 7: Binary translation

7

THANK YOU