Identifying Function Positions in Assembly Code with Machine Learning Techniques
使用機器學習技巧在組合語言裡辨識出函式位置
Abstract
Rabbit是由我們的實驗室開發的一種基於LLVM的二元碼轉譯器,在使用Rabbit的過程中發現,當Rabbit轉換不具符號表的二元碼時,得到的轉換後的二元碼在效能上會下降,原因是Rabbit在轉換及優化的過程中需要事先知道二元碼中的函式位置,但不具符號表的二元碼無法提供這項資訊,因為這項資訊儲存在符號表中,為了重新取得二元碼中的函式位置,我們嘗試使用機器學習技巧從組合碼(對二元碼反組譯得到)中恢復二元碼的函式位置,再將這些函式位置用在Rabbit中,進而產生有更好效能的二元碼,根據我們的實驗,我們的方法可以恢復90\%的函式位置,並且這些函式位置幾乎都是正確的函式位置,在使用了恢復的函式位置後,Rabbit對不具符號表的二元碼做轉譯時,得到的轉換後的二元碼有1.05x的加速,轉換過程所需的時間會減少或維持相同時間,而轉換後的二元碼會有更小的檔案大小。
Rabbit is an LLVM-based hybrid binary translator developed by our lab. According to our experience with Rabbit, the performance of target binary produced by Rabbit will decrease when the source binary is a stripped binary. The reason is that Rabbit needs to know function positions in the binary during translation and optimization, but stripped binary does not provide this information because symbol tables are stripped off. In order to compensate for the stripped symbol tables, we try to use machine-learning techniques to recover function positions from assembly code (which was produced by a disassembly process). The recovered function positions are used in Rabbit for producing target code with better performance. According to our experiments, we can recover 90% function positions and almost all of recovered function positions are correct. After applying these accurate function positions, the target binary translated by Rabbit from stripped source binary can achieve 1.05x speedup; the translation requires less or equal translation time; and the translated binary produced by Rabbit has a smaller size.
Collections
Institute of Computer Science and EngineeringCite this item
Yu, J.-L. (2021). Identifying Function Positions in Assembly Code with Machine Learning Techniques. https://thesis.lib.nycu.edu.tw/handle/20.500.14371/79461
Citation generated in APA 7th edition style; please check it before use.
Share
Permanent link: https://thesis.lib.nycu.edu.tw/handle/20.500.14371/79461