Patent ID: 8566372
Filing Date: 2013-10-22
Classification: G06F

Abstract:
1. A method for modifying a dynamic application file in a mobile terminal, comprising: downloading another dynamic application file, which is a relocatable file, to the mobile terminal; dynamically loading the relocatable file, including: analyzing the relocatable file, searching for a relocation section according to information obtained through the analysis, and 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, if the skipping distance does not exceed the range of the short skipping, then filling 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 and making a skipping exceeding the range of the short skipping skip indirectly to the relocation target address to perform relocation loading; and wherein adding the veneer code comprises: generating the veneer code, and filling a long skipping instruction and the external symbol address which is referenced by the dynamic application file into the veneer code, respectively; filling an initial address of the veneer code into the address to be relocated to form an effective short skipping, an effective short skipping instruction directs to the veneer code; and making the skipping exceeding the range of the short skipping skip indirectly to the relocation target address comprises: skipping to the veneer code through the effective short skipping, then skipping to the referenced external symbol address through a long skipping of the veneer code.