Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

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.

Active Publication Date: 2018-12-28
MAIPU COMM TECH CO LTD
View PDF3 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] Embodiments of the present invention provide a hot patch method and device, which are used to solve the problems of traditional hot patch methods that require relocation, inflexible memory allocation, and the inability to realize that one patch file corresponds to multiple applications

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Hot patch method and device
  • Hot patch method and device
  • Hot patch method and device

Examples

Experimental program
Comparison scheme
Effect test

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. ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a hotfix method and device, and relates to the field of embedded operating systems. The hotfix method and device are used for solving the problems that when a traditional hotfix method is used, repositioning needs to be conducted, storage allocation is not flexible and one patch file can not correspond to multiple applications. The method includes the steps of adding a dynamic link compiling option when compiling a patched program, and adding an external symbol of a patched function to a dynamic symbol table so that the compiled external symbol can be relocated through a dynamic link library, wherein the patched program includes the patched function and the external symbol; compiling a patching function through the dynamic link library so that the external symbol can be relocated through the compiled patching function, wherein the patching function is the function for repairing the patched function; loading the patching function and relocating the external symbol; activating the patching function, and deactivating the patched function. The hotfix method and device are used for hotfix relocation.

Description

technical field [0001] The invention relates to the field of embedded operating systems, in particular to a hot patch method and device. Background technique [0002] For devices using the embedded Linux operating system, high reliability and stability are required, but there are inevitably various errors in the software programs running on it. In order to solve the errors in the software programs, one way is to perform system software Upgrade, but it will cause the device to restart and affect the current business. Another way is to use hot patches. The advantage is that it does not need to restart the device and will not affect the current business. But the traditional hot patch method has the following problems: [0003] In the traditional hot patch method, the hot patch file is a static object file that has not been compiled and linked, and the external symbols in it need to be relocated when used, and the whole relocation process is very complicated. [0004] The trad...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F8/41G06F8/656
CPCG06F8/656
Inventor 李斌梁晖林茂
Owner MAIPU COMM TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products