摘要
电力企业在将反汇编技术应用于嵌入式智能电表软件一致性检测模型时出现了因不同硬件而产生差异的字节序问题和程序运行时的嵌入式设备内存受限问题,从而影响了模型整体的性能。针对这两个关键问题进行分析,结合嵌入式智能电表内部特征和硬件体系架构理论的深层探讨,依次提出了目标代码双逆置预处理算法(CDIPA)和分段反汇编算法(SDA)。对原代码使用目标代码双逆置预处理算法得到调整字节顺序的代码,分别将原代码和调整代码反汇编获得两种待测结果,结合硬件信息分析结果并以匹配度高的指令作为最终结果从而解决了字节序问题;分段反汇编算法通过调整反汇编输入规模并分次运行的方法解决设备内存受限问题。实验结果表明将这两种算法用于给定的电表设备,可以有效解决上述关键问题,同时算法也表现出良好的健壮性和可移植性。
Two key problems, endianness and memory capacity limit appear to be obstacles when electric enterprises implement a function consistency model for embedded smart meter software via disassembly technique, thus affecting the overall performance of the model. To solve these problems, a in-depth analysis was conducted combined with internal features of embedded smart meter and hardware architecture theory. Two algorithms named Code Double Inverse Preprocessing Algorithm (CDIPA) and Segmented Disassembling Algorithm (SDA) were proposed. CIDPA was used to generate adjusted binary code, together with raw binary as two inputs of disassembly. Thus endianness problem was solved by choosing the result more adaptable to hardware environment. SDA was adopted to decrease size of input binary so as to disassemble more times in limited memory. The experimental results show that CDIPA and SDA can effectively resolve the problems mentioned above and show up favorable robustness and portability.
出处
《计算机应用》
CSCD
北大核心
2014年第12期3507-3510,3514,共5页
journal of Computer Applications
关键词
嵌入式系统
字节序
内存受限
固件代码预处理
分段反汇编
embedded system
endianness
memory capacity limit
firmware code pre-process
segmented disassembly