Method and apparatus for modifying relocatable object code files and monitoring programs
First Claim
1. A computer program product stored on a computer readable medium that stores computer codes for equipping a computer program with an interceptor function for being executed in place of an intercepted function, said computer program having a plurality of object code files including a first object code file containing a definition of said intercepted function and a second object code file including a first structure identifying said intercepted function definition by an original intercepted function name, said computer program product comprising:
- computer code that modifies said first structure to identify said intercepted function definition by a modified intercepted function name, whereby a modified second object code file is produced;
computer code that provides a third object code file containing a definition of said interceptor function and a second structure identifying said interceptor function definition by said original intercepted function name; and
computer code that links at least said modified first object code file, said second object code file and said third object code file to produce a modified computer program whereby a first call causes execution of said interceptor function.
1 Assignment
0 Petitions
Accused Products
Abstract
An object code expansion program inserts new instructions and data between preexisting instructions and date of an object code file; offsets are modified to reflect new positions of the preexisting instructions and data. For each item of preexisting object code (instructions or data), the following steps are performed: making a new code block comprising any desired new instructions and the item, and storing it as new object code; tracking the location of the item and the new code block within the new object code; and tracking items that contain inter-item offsets. Then, each inter-item offset is updated using the new location of the item or new code block, as required. Finally, offsets in symbol tables and relocation structures are updated with the new location of the item.
56 Citations
5 Claims
-
1. A computer program product stored on a computer readable medium that stores computer codes for equipping a computer program with an interceptor function for being executed in place of an intercepted function, said computer program having a plurality of object code files including a first object code file containing a definition of said intercepted function and a second object code file including a first structure identifying said intercepted function definition by an original intercepted function name, said computer program product comprising:
-
computer code that modifies said first structure to identify said intercepted function definition by a modified intercepted function name, whereby a modified second object code file is produced;
computer code that provides a third object code file containing a definition of said interceptor function and a second structure identifying said interceptor function definition by said original intercepted function name; and
computer code that links at least said modified first object code file, said second object code file and said third object code file to produce a modified computer program whereby a first call causes execution of said interceptor function. - View Dependent Claims (2, 3, 4, 5)
-
Specification