Font Size: a A A

Link Time Dead Code Elimination And Machine Code Translation Based On Pattern Matching

Posted on:2016-02-14Degree:MasterType:Thesis
Country:ChinaCandidate:P Y LiFull Text:PDF
GTID:2308330467994922Subject:Computer system architecture
Abstract/Summary:PDF Full Text Request
Except the speed of linking and the performance of the output file, the size of the output file is one of the most important parameters of a linker. For today’s large-scale software projects, there are many useless codes and files which greatly increase the size of the executable file. Though link time dead code elimination, we can eliminate these codes and reduce the size of the executable file to some extent. Traditional program linking technologies are based on sections and they are not able to strip the program at function or variable level.Linking technologies based on atomic model are much different as they are based on atoms. Atoms are the abstract representation of indivisible chunks of code or data such as functions, variables and so on. The lid program is just one of such programs. It is one of the sub programs of LLVM-an open source compiler infrastructure project. This paper first analyzes the process of linking technology based on atoms, and then, based on lld, realizes the link time dead code elimination for X8664Linux platform. The result of the experiment shows, lld can produce smaller executable file after our dead code elimination optimization.Machine code translation converts machine code into assembler code, commonly used in disassembly, debugging, virus analysis and other fields. Machine code translation is based on a series of tables which are used as the description of the instruction set, including the instruction set format table, the op-code table, the addressing table, and so on. Traditional translation methods query these tables step by step to find the corresponding assembly code. Traditional methods are usually slow because of the complexity of table look-up process. This paper proposes a method based on pattern matching. By creating pattern table and matching table, we establish a direct mapping between the machine code and the assembly code. Since this method greatly simplifies the table look-up process, we improve the speed of the machine code translation to some extent.
Keywords/Search Tags:Atomic model, Link time omptimization, Dead code elimination, Machine code translation, Pattern matching
PDF Full Text Request
Related items