簡易檢索 / 詳目顯示

研究生: 李宗憲
Zong-Xian Li
論文名稱: ZQEMU:使用QEMU和LLVM之具適應性靜態二進制轉譯器
ZQEMU:Adaptable Static Binary Translator Using QEMU And LLVM
指導教授: 黃元欣
Yuan-Shin Hwang
口試委員: 張榮貴
Rong-Guey Chang
賴祐吉
Yu-Chi Lai
學位類別: 碩士
Master
系所名稱: 電資學院 - 資訊工程系
Department of Computer Science and Information Engineering
論文出版年: 2013
畢業學年度: 101
語文別: 中文
論文頁數: 60
中文關鍵詞: 靜態二進制轉譯間接式跳轉
外文關鍵詞: static, binary translation, indirect jump
相關次數: 點閱:278下載:11
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報

Binary Translation技術是將某一平台架構之Binary executable 轉換成另一種平台架構的Binary executable。Binary Translation的分類大致上又可分為兩類:Static Binary Translation 以及 Dynamic Binary Translation,而能夠支援多種平台架構間相互轉換的Binary Translator,又稱其具有Resourceable和Retargetable (Adaptable)的性質。
在本篇論文中,將實作一個以SQEMU為基礎的Static Binary Translator - ZQEMU。主要機制是透過串聯QEMU以及LLVM 編譯器兩大工具來完成轉譯的功能,而經過分析SQEMU在效能上的瓶頸並針對其問題點加以改善後,ZQEMU在效能上有顯著的提升,此外我們也將提出一種新的概念來解決Indirect Jump的問題。


Binary translation techniques aim at translating the binary executable from an platform to another.Binary translation can be classified in two categories: static binary translation and dynamic binary translation, and the translator which can translate between many kinds of platforms, called it has characteristic of resourceable and retargetable(adaptable).
In this paper, we implement a static binary translator based on SQEMU - ZQEMU.The mechanism is using QEMU and LLVM to accomplish the translation, after our analysis for bottleneck of performance of SQEMU, ZQEMU can improve the performance of target binary program effectively than SQEMU, in addition, we provide a resolution to solve the indirect jump problem

論文摘要............i 誌 謝..............ii 目錄...............iii 圖目錄..............v 表目錄..............vii 第一章 序論..........1 1.1 研究背景.........1 1.2 研究動機.........1 1.3 研究目的.........2 1.4 研究方法.........2 1.5 論文架構.........3 第二章 文獻回顧.......4 2.1 Binary Translation..4 2.2 QEMU............8 2.3 LLVM............9 2.4 SQEMU Translator....11 第三章 議題探討.......12 3.1 程式結構.........12 3.2 間接式跳轉........13 3.3 Load/Store指令...14 第四章 方法...........17 4.1 概念.............17 4.2 資料結構..........21 4.3 定義函式..........25 4.4 定義型別..........28 4.5 減少Load/Store指令..33 第五章 實驗結果........39 5.1 實驗環境..........39 5.2 效能評估............41 第六章 結論與未來展望.....50 6.1 結論...............50 6.2 未來展望............50

[1] F. Bellard, “Qemu, a fast and portable dynamic translator,” in USENIX Annual Technical Conference, FREENIX Track, 2005, pp. 41–46.

[2] C. Cifuentes and V. M. Malhotra, “Binary Translation: Static, Dynamic,Retargetable?” in Proceedings of the 1996 International Conference on Software Maintenance, ser. ICSM ’96. Washington, DC, USA: IEEE Computer Society, 1996.

[3] C. Lattner and V. Adve, “LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation,” in Proceedings of the international symposium on Code generation and optimization: feedback-directed and runtime optimization, ser. CGO ’04. Washington, DC,USA: IEEE Computer Society, 2004, pp. 75–.

[4] V. Bala, E. Duesterwald, and S. Banerjia, “Dynamo: a transparent
dynamic optimization system,” in PLDI ’00: Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation. New York, NY, USA:
ACM, 2000, pp. 1–12.

[5] V. Adve, C. Lattner, M. Brukman, A. Shukla, and B. Gaeke. LLVA: A Low-level Virtual Instruction Set Architecture. In 36th Int’l Symp. on Microarchitecture, pages 205–216, San Diego, CA, Dec 2003.

[6] S. Sridhar, J. S. Shapiro, E. Northup, and P. P. Bungale, “HDTrans: An Open Source, Low-Level Dynamic Instrumentation System”, Proceedings of VEE’06, June 2006, Ottawa, Ontario, Canada, pp.175–185.

[7] C. Cifuentes and M. V. Emmerik, “UQBT: Adaptable Binary Translation at Low Cost,” Computer, vol. 33, pp. 60–66, March 2000.

[8] C. Lattner and V. Adve. LLVM Language Reference Manual. http://llvm.cs.uiuc.edu/docs/LangRef.html.

[9]“Tiny Code Generator (TCG) Documentation,”
http://wiki.qemu.org/Documentation/TCG.

[10] “CLANG,” http://clang.llvm.org.

[11] Chi-Keung et al Luk. Pin: building customized program analysis tools with dynamic instrumentation. In PLDI ’05: Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation, pages 190–200, New York, NY, USA, 2005. ACM.

[12] M. R. Guthaus et al. MiBench: A free, commercially representative embedded benchmark suite. In IEEE 4th Workshop on Workload Characterization, Dec. 2001.

[13] “GCC, the GNU Compiler Collection,” http://gcc.gnu.org/.

[14] T. Austin, E. Larson, and D. Emst. Simplescalar: An infrastruc-ture for computer system modeling. In IEEE Computer, 35(2):59–67, 2002.

[15] B. De Sutter, B. De Bus, K. De Bosschere, P. Keyngnaert, and B. Demoen, “On the Static Analysis of Indirect Control Transfers in Binaries”, Proc. International Conference on Parallel and Distributed Processing Techniques and Applications (PDPTA), 2000.

[16] C. Cifuentes and M. Van Emmerik, “Recovery of Jump Table Case Statements from Binary Code” Proceedings of the International Workshop on Program Comprehension, May 1999

[17] H. Theiling, “Extracting Safe and Precise Control Flow from Binaries” Proceedings of the 7th Conference on Real-Time Computing Systems and Applications, Dec. 2000.

[18] Kruegel, Christopher, et al. "Static disassembly of obfuscated binaries."Proceedings of the 13th USENIX Security Symposium. 2004

[19] Jhong-Jhe Wu "SQEMU:A Retargetable Static Binary Translator"

QR CODE