Hot patch method and device
A hot patch and patch technology, applied in the field of embedded operating systems, can solve the problems of inflexible memory allocation and inability to implement multiple applications in one patch file.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0050] Embodiments of the present invention provide a hot patch method, referring to figure 1 shown, including:
[0051] Step 101, adding a dynamic link compilation option when compiling the patched program, so that the external symbols of the patched function are added to the dynamic symbol table, so that the compiled external symbols can be relocated by the dynamic link library, wherein the patched program contains Patched functions and external symbols;
[0052] Step 102, compiling the patch function through a dynamic link library, so that the compiled patch function can relocate external symbols, wherein the patch function is a function for patching the patched function;
[0053] Step 103, load the patch function and relocate external symbols;
[0054] Step 104, activate the patch function and deactivate the patched function.
[0055] The hot patch method that the embodiment of the present invention provides adds the dynamic link compiling option when compiling the patc...
Embodiment 2
[0057] Embodiments of the present invention provide another hot patch method, referring to figure 2 shown, including:
[0058] Step 201, adding a dynamic link compilation option when compiling the patched program, so that the external symbols of the patched function are added to the dynamic symbol table, so that the compiled external symbols can be relocated by the dynamic link library, wherein the patched program contains Patched functions and external symbols.
[0059] Step 202 , configure a patch function replacement table, and generate a patch target source file in combination with the patch function, wherein the patch function replacement table includes a corresponding relationship between a patch function and a function to be patched.
[0060] Step 203, compiling the patch target source file to generate a patch file in a dynamic link library format.
[0061] Step 204, load the patch function and relocate external symbols.
[0062] Step 205: Obtain addresses of the pa...
Embodiment 3
[0102] Embodiments of the present invention provide a hot patch device for performing figure 1 The hotpatch method shown in , refer to Figure 5 shown, including:
[0103] The compilation unit 51 is used to increase the dynamic link compilation option when the patched program is compiled, so that the external symbols of the patched function are added to the dynamic symbol table, so that the compiled external symbols can be relocated by the dynamic link library, wherein The patch contains patched functions and external symbols;
[0104] The production unit 52 is configured to compile the patch function through a dynamic link library, so that the compiled patch function can relocate external symbols, wherein the patch function is a function for patching the patched function;
[0105] A loading unit 53, configured to load patch functions and relocate external symbols;
[0106] The loading unit 53 is also used to activate the patch function and deactivate the patched function. ...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com