CN103294457A - Method and device for dynamically substituting C/C + + function in main program - Google Patents

Method and device for dynamically substituting C/C + + function in main program Download PDF

Info

Publication number
CN103294457A
CN103294457A CN2012100475389A CN201210047538A CN103294457A CN 103294457 A CN103294457 A CN 103294457A CN 2012100475389 A CN2012100475389 A CN 2012100475389A CN 201210047538 A CN201210047538 A CN 201210047538A CN 103294457 A CN103294457 A CN 103294457A
Authority
CN
China
Prior art keywords
function
replaced
replacement
master routine
program module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2012100475389A
Other languages
Chinese (zh)
Other versions
CN103294457B (en
Inventor
禤彪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201210047538.9A priority Critical patent/CN103294457B/en
Publication of CN103294457A publication Critical patent/CN103294457A/en
Application granted granted Critical
Publication of CN103294457B publication Critical patent/CN103294457B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a method and a device for dynamically substituting a C/C + + function in a main program. The method includes steps as follows: the main program is started, and a substitution program module used for inquiring and modifying a memory is loaded; the loaded substitution program module is initialized, so that the substitution program module is executed in advance of a main function in the main program; symbol table information of a function in the main program is stored in the memory; after the substitution program module receives a substitution instruction, the substitution program module determines a mapping address of a substituted function in the memory according to symbol table information corresponding to the substituted function; and the substituted function is substituted according to the mapping address. The method and the device can dynamically substitute and restore the function during operation of the program, the program is not required to be recompiled, time is saved, high efficiency is realized, and the infinite loop phenomenon when the substituted function is indirectly called inside a substitution function is avoided.

Description

The method of C/C++ function and device in the dynamic replacement master routine
Technical field
The present invention relates to the computer science and technology field, particularly method and the device of C/C++ function in a kind of dynamic replacement master routine.
Background technology
When under Linux, carrying out the work such as debugging, Mock and test of C/C++ program, often need use function and replace.Function is replaced and is referred to use the replacement function covering to be replaced function.The technology of replacing the C/C++ function under the existing Linux mainly is by the LD_PRELOAD environmental variance is set, and disposable loading shared library finishes that function replaces when program start.In loading procedure, if function of the same name is arranged in the shared library, as malloc etc., then can be automatically the system function malloc of correspondence be replaced with replacement function malloc in the shared library.
Though existing method can realize function and replace, have following shortcoming:
(1) method that the LD_PRELOAD environmental variance is set under the Linux is disposablely to load when program start, therefore can not dynamically replace and reduce the shared library function when program is moved.Carry out function at every turn and replace, all need to reload shared library, start-up routine, so the running time is long, replacement efficient is low.
(2) because the system function that is replaced will be substituted fully, if therefore call the system function that is replaced indirectly in the inside of replacement function, then will cause replacement function to repeat to call self, thereby cause endless loop.
(3) method that the LD_PRELOAD environmental variance is set can only load the shared library function, and therefore existing method can not be replaced the function of non-shared library, as user-defined function etc., therefore brings inconvenience for user's use.
Summary of the invention
Purpose of the present invention is intended to solve at least one of above-mentioned technological deficiency.
For this reason, the objective of the invention is to propose the method for C/C++ function in a kind of dynamic replacement master routine, when the C/C++ function is replaced, can the realization program dynamically replace and go back original function during operation, need not again program to be compiled, the time-saving and efficiency, and avoid being replaced the endless loop phenomenon that function occurs in the inner indirect call of replacement function.This method can be applied to debugging, Mock and the test etc. of C/C++ program.In a preferred embodiment of the invention, the present invention is applied under the Linux.
For achieving the above object, embodiments of the invention disclose the method for C/C++ function in a kind of dynamic replacement master routine.This method may further comprise the steps: start master routine, and load the replacement program module that is used for inquiry and revises internal memory; The described replacement program module that loads is carried out initialization so that described replacement program module is carried out prior to the principal function in the described master routine, and the symbol table information of function in the described master routine is saved in the internal memory; After described replacement program module received replacement instruction, described replacement program module was determined the described image address of function in described internal memory that be replaced according to being replaced function corresponding symbol table information; And according to described image address the described function that is replaced is replaced.
The embodiment of the invention loads the replacement program module that is used for inquiry and revises internal memory when starting master routine.When carrying out the function replacement, the memory mapping that on-the-fly modifies program by the replacement program module when program is moved is finished the function replacement process, therefore need not the binary file of update routine, and need not source code is compiled again, when program is moved, can dynamically replace and reduce, improved the efficient of program.
And, owing to when change is replaced the memory mapping address of function correspondence, preserved the address that is replaced function, therefore avoided when loading replacement function by the environmental variance method is disposable during at program start, the inner indirect call of the replacement function of appearance is replaced the endless loop phenomenon of function.
In addition, the embodiment of the invention is finished the function replacement by replacing program module modification memory mapping, and therefore the function of replacing is not restricted to the shared library function, and the replacement scope can expand to non-shared library function, and the user can self-defined replacement function.
In one embodiment of the invention, the described function that is replaced is kinematic function, describedly according to described image address the described function that is replaced is replaced further and is comprised: the described image address that is replaced function is backed up; And the image address that the described image address that is replaced function is replaced with new function.
The embodiment of the invention makes the function replacement process to recall by backing up before the image address of renewal function, thereby realizes the dynamic reduction of replacement function.
In one embodiment of the invention, the described function that is replaced is static function, describedly according to described image address the described function that is replaced is replaced further and is comprised: determine the described entry address that is replaced function according to the described image address that is replaced function; According to the described entry address that is replaced function the described bytecode that is replaced the function correspondence is divided into first section bytecode and second section bytecode, wherein, be that elementary cell is divided with the instruction, described first section bytecode is for to be longer than the minimum length bytecode of immediate skip far away from function entrance to length; Described first section bytecode backed up to new storage allocation, and the relative address redirect in first section bytecode described in the described new storage allocation is revised as the specific address redirect; Adding first immediate skip far away after first section bytecode described in the described new storage allocation, described first immediate skip far away jumps to described second section bytecode; And the described first section bytecode that is replaced the function correspondence be revised as second immediate skip far away, described second immediate skip far away jumps to the image address of new function.
The embodiment of the invention is replaced function by new storage allocation and modification, makes the function replacement process to recall, thereby realizes being replaced the dynamic reduction of function.
In one embodiment of the invention, described replacement program module is as shared library, loaded by the LD_PRELOAD environmental variance of Linux.
Wherein, particularly, loaded further by the described LD_PRELOAD environmental variance of described Linux and to comprise: it is to be compiled into the described replacement program module of described shared library and the independent stubs that the user writes that described LD_PRELOAD environmental variance is set, wherein, the initialization function of the independent stubs write of described user can arrange the dynamic replacement of function; Start described master routine.
In one embodiment of the invention, described replacement program module is as static library, and link loads during by compiling, further comprises: arrange by the dynamic replacement of application programming interface (API) to function in described master routine; Interpolation is pointed to the link of described replacement program module and described master routine is compiled in described master routine, and wherein, described replacement program module is by compiling and as static library; Start described master routine.
For achieving the above object, embodiments of the invention also disclose the device of C/C++ function in a kind of dynamic replacement master routine, comprise: replace program module, be used for inquiry and revise internal memory, and after receiving replacement instruction, determine the described image address of function in described internal memory that be replaced according to being replaced function corresponding symbol table information, and according to described image address the described function that is replaced is replaced; And loading and initialization module, be used for loading and the described replacement program module of initialization so that described replacement program module is carried out prior to the principal function of described master routine, and the symbol table information of function in the described master routine is saved in the internal memory.
The aspect that the present invention adds and advantage part in the following description provide, and part will become obviously from the following description, or recognize by practice of the present invention.
Description of drawings
Above-mentioned and/or the additional aspect of the present invention and advantage are from obviously and easily understanding becoming the description of embodiment below in conjunction with accompanying drawing, wherein:
Fig. 1 is the FB(flow block) process flow diagram according to the method for C/C++ function in the dynamic replacement master routine of the embodiment of the invention;
Fig. 2 is the method synoptic diagram of C/C++ function in the dynamic replacement master routine of the specific embodiment of the invention; And
Fig. 3 is the structure drawing of device according to C/C++ function in the dynamic replacement master routine of the embodiment of the invention.
Embodiment
Describe embodiments of the invention below in detail, the example of described embodiment is shown in the drawings, and wherein identical or similar label is represented identical or similar elements or the element with identical or similar functions from start to finish.Be exemplary below by the embodiment that is described with reference to the drawings, only be used for explaining the present invention, and can not be interpreted as limitation of the present invention.
Below with reference to the method flow diagram of Fig. 1 description according to C/C++ function in the dynamic replacement master routine of the embodiment of the invention.As shown in Figure 2, be the method synoptic diagram of C/C++ function in the dynamic replacement master routine of the specific embodiment of the invention.Preferably, the present invention is used under the linux system, will be that example is described with the linux system in following embodiment.
Step S110: start master routine, and load the replacement program module.In an embodiment of the present invention, this replaces program module for replacing the program module inquiry and revising internal memory.
Particularly, the embodiment of the invention can load the replacement program module that is used for inquiry and revises internal memory by one of following dual mode:
Mode one, can replace program module as shared library, be loaded by the LD_PRELOAD environmental variance of Linux.
More specifically, the embodiment of the invention is further comprised by the step that the LD_PRELOAD environmental variance of Linux loads:
Step S1111: it is to be compiled into the replacement program module of shared library and the independent stubs that the user writes that the LD_PRELOAD environmental variance is set, and wherein, the initialization function of the independent stubs that the user writes can arrange the dynamic replacement of function.
Step S1112: start master routine.
Because the LD_PRELOAD environmental variance is arranged, when master routine started, program can load the independent stubs that replacement program module and invoke user are write earlier.The initialization function of the independent stubs that the user writes can arrange the dynamic replacement of function, therefore, has finished the setting of dynamic replacement in the time of independent stubs that invoke user is write.
Mode two, also can replace program module as static library, link loads during by compiling.
Wherein, the embodiment of the invention will be replaced program module as static library, and the step that link loads during by compiling further comprises:
Step S1121: in master routine, arrange by the dynamic replacement of application programming interface (API) to function.
Step S1122: in master routine, add to point to replace the link of program module and master routine is compiled, wherein, replace program module by compiling and as static library.
Step S1123: start master routine.
Step S120: the replacement program module that loads is carried out initialization so that replace program module prior to the execution of the principal function in the master routine, and the symbol table information of function in the master routine is saved in the internal memory.
In one embodiment of the invention, can pass through the C/C++ key word _ _ attribute__ ((constructor)) defined attribute function, wherein this attribute function carries out initialization to replacing program module.The execution of this function is prior to the principal function in the master routine, and the constructed fuction attribute of this attribute function can replace program module by auto-initiation, therefore replaces the execution of program module also prior to master routine.The initialization function of replacing control module can be analyzed the binary file of master routine, thereby obtains the symbol table information of function and be saved in the internal memory.
Step S130: after the replacement program module receives replacement instruction, replace program module and determine to be replaced the image address of function in internal memory according to being replaced function corresponding symbol table information.In one embodiment of the invention, replace program module and can obtain being replaced the information of function by the symbol table of searching function, thereby determine to be replaced the image address of function in internal memory.
Step S140: replace being replaced function according to image address.
Particularly, replacement process is that kinematic function or static function can be divided into dual mode according to being replaced function:
(1) if being replaced function is kinematic function, then according to image address the step that is replaced function and replaces is further comprised:
Step S1411: the image address that will be replaced function backs up.
Back up by the image address that will be replaced function, make the function replacement process to recall, thereby realize being replaced the dynamic reduction of function.
Step S1412: the image address that will be replaced function replaces with the image address of new function.
After this in master routine when operation, will call function, is searching when being replaced function, will be from symbol table information to the image address of replacement function, thereby finish the function replacement process.
(2) if being replaced function is static function, then according to image address the step that is replaced function and replaces is further comprised:
Step S1421: the entry address of determining to be replaced function according to the image address that is replaced function.
Step S1422: the bytecode that will be replaced the function correspondence according to the entry address that is replaced function is divided into first section bytecode and second section bytecode, wherein, first section bytecode is for being elementary cell with the instruction extremely from function entrance, and length is longer than the minimum length bytecode of immediate skip far away.Therefore because first section bytecode will change to immediate skip far away, must be longer than the minimum length bytecode of immediate skip far away in length, and for the integrality of hold instruction, when intercepted length, need be elementary cell with the instruction.
Step S1423: first section bytecode backed up to new storage allocation, and the relative address redirect in first section bytecode in the new storage allocation is revised as the specific address redirect.
Step S1424: add first immediate skip far away after first section bytecode in new storage allocation, first immediate skip far away jumps to second section bytecode.First section bytecode interpolation first immediate skip far away challenged second section bytecode in new storage allocation, and the relative address redirect in first section bytecode is revised as the specific address redirect, step S1423 and step S1424 have finished the backup to the image address that is replaced function, make the function replacement process to recall, thereby realize being replaced the dynamic reduction of function.
Step S1425: first section bytecode that will be replaced the function correspondence is revised as second immediate skip far away, and second immediate skip far away jumps to the image address of new function.When calling this static function, program finds the entry address of function, and the function of execution is replacement function.Arrive the purpose that kinematic function is replaced by the bytecode that resides in the internal memory of replacing static function.
No matter be to adopt static state or dynamic method, the embodiment of the invention avoids the binary file of update routine to carry out the function replacement by on-the-fly modify the memory mapping of program when program is moved, and source code need not to compile again, has improved the efficient of program.Owing to change the memory mapping address that is replaced the function correspondence, but preserve the address that is replaced function simultaneously, avoid when loading replacement function by the environmental variance method is disposable during at program start, the inner indirect call of the replacement function of appearance is replaced the endless loop phenomenon of function.And the function that the method for the embodiment of the invention can be replaced is not restricted to the shared library function, and the replacement scope expands to non-shared library function, and the user can self-defined replacement function.
As shown in Figure 3, be the structure drawing of device according to C/C++ function in the dynamic replacement master routine of the embodiment of the invention.Should be under Linux in the dynamic replacement master routine device of C/C++ function comprise and replace program module 110 and loading and initialization module 120.Replacing program module 110 is used for inquiry and revises internal memory, and after receiving replacement instruction, determine the described image address of function in described internal memory that be replaced according to being replaced function corresponding symbol table information, and according to described image address the described function that is replaced is replaced.Loading and initialization module 120 are used for loading and initialization is replaced program module 110 so that replacement program module 110 is carried out prior to the principal function of master routine, and the symbol table information of function in the master routine is saved in the internal memory.
In one embodiment of the invention, be replaced function and can be kinematic function, then replace the image address that program module 110 will be replaced function and back up, and the image address that will be replaced function replaces with the image address of new function.
In one embodiment of the invention, be replaced function and can be static function, replacing program module 110 determines to be replaced the entry address of function and is divided into first section bytecode and second section bytecode according to the bytecode that the entry address that is replaced function will be replaced the function correspondence according to the image address that is replaced function, wherein, be that elementary cell is divided with the instruction, first section bytecode is for to be longer than the minimum length bytecode of immediate skip far away from function entrance to length.Then replace program module 110 first section bytecode backed up to new storage allocation, and in new storage allocation, add first immediate skip far away after first section bytecode, and first section bytecode that will be replaced the function correspondence is revised as second immediate skip far away, wherein, first immediate skip far away is used for jumping to second section bytecode, and second immediate skip far away is used for jumping to the image address of new function.
In one embodiment of the invention, replace program module 110 as shared library, loaded by the LD_PRELOAD environmental variance of Linux.
In another embodiment of the present invention, replace program module 110 as static library, the link during by compiling loads.
In one embodiment of the invention, load and initialization module 120 by the C/C++ key word _ _ attribute__ ((constructor)) defined attribute function, wherein, attribute function carries out initialization to replacing program module.
The embodiment of the invention loads replacement program module 110 and loading and the initialization module 120 that is used for inquiry and revises internal memory when starting master routine.When carrying out the function replacement, the memory mapping that on-the-fly modifies program by replacement program module 110 when program is moved is finished the function replacement process, therefore need not the binary file of update routine, and need not source code is compiled again, when program is moved, can dynamically replace and reduce, improved the efficient of program.
And, owing to when change is replaced the memory mapping address of function correspondence, preserved the address that is replaced function, therefore avoided when loading replacement function by the environmental variance method is disposable during at program start, the inner indirect call of the replacement function of appearance is replaced the endless loop phenomenon of function.
In addition, the embodiment of the invention is finished the function replacement by replacing program module modification memory mapping, and therefore the function of replacing is not restricted to the shared library function, and the replacement scope can expand to non-shared library function, and the user can self-defined replacement function.
In the description of this instructions, concrete feature, structure, material or characteristics that the description of reference term " embodiment ", " some embodiment ", " example ", " concrete example " or " some examples " etc. means in conjunction with this embodiment or example description are contained at least one embodiment of the present invention or the example.In this manual, the schematic statement to above-mentioned term not necessarily refers to identical embodiment or example.And concrete feature, structure, material or the characteristics of description can be with the suitable manner combination in any one or more embodiment or example.
Although illustrated and described embodiments of the invention, for the ordinary skill in the art, be appreciated that without departing from the principles and spirit of the present invention and can carry out multiple variation, modification, replacement and modification to these embodiment that scope of the present invention is by claims and be equal to and limit.

Claims (18)

1. the method for C/C++ function in the dynamic replacement master routine is characterized in that, may further comprise the steps:
Start master routine, and load the replacement program module that is used for inquiry and revises internal memory;
The described replacement program module that loads is carried out initialization so that described replacement program module is carried out prior to the principal function in the described master routine, and the symbol table information of function in the described master routine is saved in the internal memory;
After described replacement program module received replacement instruction, described replacement program module was determined the described image address of function in described internal memory that be replaced according to being replaced function corresponding symbol table information; And
According to described image address the described function that is replaced is replaced.
2. the method for C/C++ function in the dynamic replacement master routine as claimed in claim 1 is characterized in that, the described function that is replaced is kinematic function.
3. the method for C/C++ function in the dynamic replacement master routine as claimed in claim 2 is characterized in that, describedly according to described image address the described function that is replaced is replaced further and is comprised:
The described image address that is replaced function is backed up; And
The described image address that is replaced function is replaced with the image address of new function.
4. the method for C/C++ function in the dynamic replacement master routine as claimed in claim 1 is characterized in that, the described function that is replaced is static function.
5. the method for C/C++ function in the dynamic replacement master routine as claimed in claim 4 is characterized in that, describedly according to described image address the described function that is replaced is replaced further and is comprised:
Determine the described entry address that is replaced function according to the described image address that is replaced function;
According to the described entry address that is replaced function the described bytecode that is replaced the function correspondence is divided into first section bytecode and second section bytecode, wherein, be that elementary cell is divided with the instruction, described first section bytecode is for to be longer than the minimum length bytecode of immediate skip far away from function entrance to length;
Described first section bytecode backed up to new storage allocation, and the relative address redirect in first section bytecode described in the described new storage allocation is revised as the specific address redirect;
Adding first immediate skip far away after first section bytecode described in the described new storage allocation, described first immediate skip far away is used for jumping to described second section bytecode; And
The described first section bytecode that is replaced the function correspondence is revised as second immediate skip far away, and described second immediate skip far away is used for jumping to the image address of new function.
6. the method for C/C++ function in the dynamic replacement master routine as claimed in claim 1 is characterized in that, described replacement program module is as shared library, is loaded by the LD_PRELOAD environmental variance of Linux.
7. the method for C/C++ function in the dynamic replacement master routine as claimed in claim 6 is characterized in that, described described LD_PRELOAD environmental variance by Linux loads further and comprises:
It is to be compiled into the described replacement program module of described shared library and the independent stubs that the user writes that described LD_PRELOAD environmental variance is set, and wherein, the initialization function of the independent stubs that described user writes can arrange the dynamic replacement of function; And
Start described master routine.
8. the method for C/C++ function in the dynamic replacement master routine as claimed in claim 1 is characterized in that, described replacement program module is as static library, and the link during by compiling loads.
9. the method for C/C++ function in the dynamic replacement master routine as claimed in claim 8 is characterized in that, described replacement program module is as described static library, and link loads further and comprises during by compiling:
Dynamic replacement by the function of application programming interface API in described master routine arranges;
Interpolation is pointed to the link of described replacement program module and described master routine is compiled in described master routine, and wherein, described replacement program module is by compiling and as static library; And
Start described master routine.
10. the method for C/C++ function in the dynamic replacement master routine as claimed in claim 1, it is characterized in that, by the C/C++ key word _ _ attribute__ ((constructor)) defined attribute function, wherein, described attribute function carries out initialization to described replacement program module.
11. the device of C/C++ function is characterized in that in the dynamic replacement master routine, comprising:
Replace program module, be used for inquiry and revise internal memory, and after receiving replacement instruction, determine the described image address of function in described internal memory that be replaced according to being replaced function corresponding symbol table information, and according to described image address the described function that is replaced is replaced; And
Load and initialization module, be used for loading and the described replacement program module of initialization so that described replacement program module is carried out prior to the principal function of described master routine, and the symbol table information of function in the described master routine is saved in the internal memory.
12. the device of C/C++ function is characterized in that in the dynamic replacement master routine as claimed in claim 11, the described function that is replaced is kinematic function.
13. the device of C/C++ function in the dynamic replacement master routine as claimed in claim 12, it is characterized in that, described replacement program module backs up the described image address that is replaced function, and the described image address that is replaced function is replaced with the image address of new function.
14. the device of C/C++ function is characterized in that in the dynamic replacement master routine as claimed in claim 11, the described function that is replaced is static function.
15. the device of C/C++ function in the dynamic replacement master routine as claimed in claim 14, it is characterized in that, described replacement program module is determined describedly to be replaced the entry address of function and according to the described entry address that is replaced function the described bytecode that is replaced the function correspondence to be divided into first section bytecode and second section bytecode according to the described image address that is replaced function, wherein, be that elementary cell is divided with the instruction, described first section bytecode is for to be longer than the minimum length bytecode of immediate skip far away from function entrance to length, and described first section bytecode backed up to new storage allocation, and adding first immediate skip far away after first section bytecode described in the described new storage allocation, and the described first section bytecode that is replaced the function correspondence be revised as second immediate skip far away, wherein, described first immediate skip far away is used for jumping to described second section bytecode, and described second immediate skip far away is used for jumping to the image address of new function.
16. the device of C/C++ function is characterized in that in the dynamic replacement master routine as claimed in claim 11, described replacement program module is as shared library, loaded by the LD_PRELOAD environmental variance of Linux.
17. the device of C/C++ function is characterized in that in the dynamic replacement master routine as claimed in claim 11, described replacement program module is as static library, and the link during by compiling loads.
18. the device of C/C++ function in the dynamic replacement master routine as claimed in claim 11, it is characterized in that, described loading and initialization module by the C/C++ key word _ _ attribute__ ((constructor)) defined attribute function, wherein, described attribute function carries out initialization to described replacement program module.
CN201210047538.9A 2012-02-27 2012-02-27 Method and device for dynamically substituting C/C + + function in main program Active CN103294457B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210047538.9A CN103294457B (en) 2012-02-27 2012-02-27 Method and device for dynamically substituting C/C + + function in main program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210047538.9A CN103294457B (en) 2012-02-27 2012-02-27 Method and device for dynamically substituting C/C + + function in main program

Publications (2)

Publication Number Publication Date
CN103294457A true CN103294457A (en) 2013-09-11
CN103294457B CN103294457B (en) 2017-02-01

Family

ID=49095401

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210047538.9A Active CN103294457B (en) 2012-02-27 2012-02-27 Method and device for dynamically substituting C/C + + function in main program

Country Status (1)

Country Link
CN (1) CN103294457B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104504333A (en) * 2014-11-25 2015-04-08 武汉安天信息技术有限责任公司 Malicious code detection method and device of ELF (executable and linkable format) file
CN105278942A (en) * 2014-07-23 2016-01-27 腾讯科技(深圳)有限公司 Component management method and apparatus
CN105630491A (en) * 2015-12-18 2016-06-01 Tcl集团股份有限公司 Method and device for changing functions of program
CN107085514A (en) * 2017-03-06 2017-08-22 北京安博通科技股份有限公司 Shared library upgrade method and device
CN108614702A (en) * 2016-12-28 2018-10-02 阿里巴巴集团控股有限公司 Bytecode-optimized method and device
WO2022166410A1 (en) * 2021-02-02 2022-08-11 华为技术有限公司 Method and apparatus for jumping between functions having symbols with different names, and computer readable storage medium
CN116149732A (en) * 2023-02-15 2023-05-23 深圳大学 Hardware automatic execution method, system and product of data flow task
CN116414424A (en) * 2023-06-09 2023-07-11 建信金融科技有限责任公司 Thermal updating method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6668340B1 (en) * 1999-12-10 2003-12-23 International Business Machines Corporation Method system and program for determining a test case selection for a software application
CN1475909A (en) * 2002-08-16 2004-02-18 华为技术有限公司 realization of isertion type system soft ware patch and control method
US6708324B1 (en) * 1999-06-24 2004-03-16 Cisco Technology, Inc. Extensible automated testing software
CN1710547A (en) * 2004-06-16 2005-12-21 华为技术有限公司 Software detection method and system
CN101004681A (en) * 2006-12-22 2007-07-25 中兴通讯股份有限公司 Method for implementing long jumping dynamic patch in embedded system
CN102156661A (en) * 2010-02-11 2011-08-17 华为技术有限公司 Method, device and system for online activating patches

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6708324B1 (en) * 1999-06-24 2004-03-16 Cisco Technology, Inc. Extensible automated testing software
US6668340B1 (en) * 1999-12-10 2003-12-23 International Business Machines Corporation Method system and program for determining a test case selection for a software application
CN1475909A (en) * 2002-08-16 2004-02-18 华为技术有限公司 realization of isertion type system soft ware patch and control method
CN1710547A (en) * 2004-06-16 2005-12-21 华为技术有限公司 Software detection method and system
CN101004681A (en) * 2006-12-22 2007-07-25 中兴通讯股份有限公司 Method for implementing long jumping dynamic patch in embedded system
CN102156661A (en) * 2010-02-11 2011-08-17 华为技术有限公司 Method, device and system for online activating patches

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105278942A (en) * 2014-07-23 2016-01-27 腾讯科技(深圳)有限公司 Component management method and apparatus
CN104504333A (en) * 2014-11-25 2015-04-08 武汉安天信息技术有限责任公司 Malicious code detection method and device of ELF (executable and linkable format) file
CN105630491A (en) * 2015-12-18 2016-06-01 Tcl集团股份有限公司 Method and device for changing functions of program
CN108614702A (en) * 2016-12-28 2018-10-02 阿里巴巴集团控股有限公司 Bytecode-optimized method and device
CN107085514A (en) * 2017-03-06 2017-08-22 北京安博通科技股份有限公司 Shared library upgrade method and device
WO2022166410A1 (en) * 2021-02-02 2022-08-11 华为技术有限公司 Method and apparatus for jumping between functions having symbols with different names, and computer readable storage medium
CN116149732A (en) * 2023-02-15 2023-05-23 深圳大学 Hardware automatic execution method, system and product of data flow task
CN116149732B (en) * 2023-02-15 2023-10-27 深圳大学 Hardware automatic execution method, system and product of data flow task
CN116414424A (en) * 2023-06-09 2023-07-11 建信金融科技有限责任公司 Thermal updating method, device, equipment and storage medium
CN116414424B (en) * 2023-06-09 2023-09-12 建信金融科技有限责任公司 Thermal updating method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN103294457B (en) 2017-02-01

Similar Documents

Publication Publication Date Title
CN103294457A (en) Method and device for dynamically substituting C/C + + function in main program
US8499289B2 (en) Method, device and system for realizing kernel online patching
US8566372B2 (en) Method and device for dynamically loading relocatable file
US9086899B2 (en) Loading and debugging method and debugging system thereof
CN110401700B (en) Model loading method and system, control node and execution node
US8381198B2 (en) Systems, methods and computer program products for safety checking executable application programs in a module
US8214812B2 (en) Method of interpreting method bytecode and system operated by the same
CN110018859B (en) Equipment starting method and device, computer equipment and storage medium
CN102147743A (en) Method for accelerating startup of embedded system application program
CN110413327B (en) Hardware driving method and device based on hardware abstraction layer
US9639343B2 (en) Method for altering execution of a program, debugger, and computer-readable medium
CN101763273B (en) Method for dynamically loading code into extended memory of embedded type system
CN102073525A (en) Method and device for dynamically upgrading Web service system based on Java platform
CN102567033A (en) Class pre-loading method and device based on embedded real-time Java virtual machine
CN104391717A (en) Method for dynamically updating code during debugging
US20110029953A1 (en) System and Method for Scalable Handling of Debug Information
CN108829465B (en) Local dynamic loading system and method based on direct read-write FLASH
CN112783558B (en) Method for accelerating self-decompression phase of Linux kernel start
CN105573796A (en) Function switching method and function switching device for FPGA
US20110078378A1 (en) Method for generating program and method for operating system
CN1980447B (en) Smooth upgrading method of communication system software edition
CN103617060A (en) Method for accelerating starting procedure of embedded software by using super state storage
US20160085545A1 (en) Method and apparatus for implementing inter-component function calls
US6883078B2 (en) Microcomputer with reduced memory usage and associated method
CN110457152B (en) System and method for solving memory leakage by using proxy mode

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant