发明名称 Method and device for dynamically loading relocatable file
摘要 The disclosure provides a method for dynamically loading a relocatable file, comprising: analyzing the relocatable file; searching for a relocation section according to the information obtained through the analysis; obtaining a relocation target address after the relocation section is found and calculating an address to be relocated and a skipping distance; determining whether the skipping distance exceeds a range of a short skipping, and if the skipping distance does not exceed the range of the short skipping, then writing the relocation target address into the address to be relocated to perform relocation loading; if the skipping distance exceeds the range of the short skipping, then adding a veneer code segment and making the skipping whose distance exceeds the range of the short skipping indirectly skip to the relocation target address to perform relocation loading. Accordingly, the disclosure provides a device for dynamically loading a relocatable file, comprising: an analyzing module, a calculating module, a searching module, a determining module, and a relocation dynamic loading module. With the solution, dynamically loading a relocatable file can be realized when the calling distance of a function exceeds the range of the short skipping.
申请公布号 US8566372(B2) 申请公布日期 2013.10.22
申请号 US201013258431 申请日期 2010.07.21
申请人 HE HAIJIAN;WU XIAOHUI;FAN WEI;ZTE CORPORATION 发明人 HE HAIJIAN;WU XIAOHUI;FAN WEI
分类号 G06F17/30 主分类号 G06F17/30
代理机构 代理人
主权项
地址