摘要
反编译技术将二进制程序或汇编程序转换成可读性较好的高级语言代码,在代码理解、代码维护和代码安全验证等方面具有重要作用。文中介绍了一种基于Power PC汇编程序的反编译软件框架及其关键技术。该软件框架主要包括由汇编程序加载、指令系统的语义描述和汇编指令的解码所组成的前端,由数据流分析、类型分析和控制流分析所组成的中间端以及负责代码生成的后端。采用的关键技术有switch语句翻译,代码复制消除goto语句和指令习语(instruction idiom)翻译等。实验结果表明,反编译生成的高级语言程序在结构、可读性等方面都有所增强,对于辅助代码理解有指导意义。
De compilation is the process of converting binary program or assembly program into high level code with good readability, which plays a vital role in code understanding, code maintenance and code safety verification. In this paper, introduce a decompilation framework based on PowerPC assembly program and its main techniques. The framework consists of the frontend, which includes the loading of the assembly programs, the semantic description and the decoding of the instruction set, the middle end, which includes data flow analysis, type analysis and control flow analysis, and the back end, which is responsible for code generation. The main techniques consist of translation of switch sentence, goto sentence of elimination by code duplication and translation of instruction idiom. Experimen- tal results show that the generated high level code improves in both structure and readability, there' s a guiding significance in code understanding.
出处
《计算机技术与发展》
2015年第8期1-8,共8页
Computer Technology and Development
基金
陕西省科技计划项目(2014K05-04)
关键词
PowerPC汇编程序
结构恢复
习语分析
反编译框架
PowerPC assembly program
structure recovery
instruction idiom analysis
decompilation framework