| CPC G06F 9/44536 (2013.01) | 13 Claims | 

| 
               1. A method for operating an application program implemented by a terminal device, comprising: 
            determining a target version from multiple versions of the application program, and determining first parameter information of the application program of the target version; 
                obtaining second parameter information of the application program transmitted by a bootloader; 
                determining a target memory address of an executed target element of a script file in the application program of the target version according to the first parameter information and the second parameter information; and 
                operating the target element of the script file in the application program of the target version in the target memory address so as to operate the application program of the target version; and 
                wherein the target element of the script file comprises a global offset table; the target memory address comprises a global offset table address; the first parameter information comprises: a first memory start address stored in a memory and designated by a linker when the application program of the target version is linked, and a first memory address of the global offset table stored in the memory after the global offset table in the application program of the target version is linked; the second parameter information comprises a second memory start address in the memory, which is actually used by the application program of the target version during operation of the application program of the target version; 
                said determining the target memory address of the executed target element of the script file in the application program of the target version according to the first parameter information and the second parameter information comprises: 
                obtaining the first memory start address and the first memory address in the first parameter information, and obtaining the second memory start address in the second parameter information; 
                calculating a first offset value of the global offset table in the memory during operation of the application program of the target version according to the first memory start address and the second memory start address; and 
                determining, according to the first memory address and the first offset value, a global offset table address of the global offset table stored in the memory during operation of the application program of the target version. 
               |