发明授权
- 专利标题: Method and device for dynamically loading relocatable file
- 专利标题(中): 用于动态加载可重定位文件的方法和设备
-
申请号: US13258431申请日: 2010-07-21
-
公开(公告)号: US08566372B2公开(公告)日: 2013-10-22
- 发明人: Haijian He , Xiaohui Wu , Wei Fan
- 申请人: Haijian He , Xiaohui Wu , Wei Fan
- 申请人地址: CN Shenzhen
- 专利权人: ZTE Corporation
- 当前专利权人: ZTE Corporation
- 当前专利权人地址: CN Shenzhen
- 代理机构: Oppedahl Patent Law Firm LLC
- 优先权: CN200910210623 20091104
- 国际申请: PCT/CN2010/075368 WO 20100721
- 国际公布: WO2011/054223 WO 20110512
- 主分类号: G06F17/30
- IPC分类号: G06F17/30
摘要:
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.
公开/授权文献
信息查询