Patent ID: 7716658

Claim:
A method for patching a set of objects containing references, comprising: using a location structure to keep track of the locations of references within the set of objects, wherein the location structure includes a table that contains addresses for objects in the set of objects, and wherein each object in the set of objects includes zero or more references; converting the references within the set of objects from absolute references into offset-based references, wherein offsets are computed with respect to base addresses of objects, wherein said offsets are stored in place of said absolute references, wherein converting the absolute references into the offset-based references involves, for each absolute reference in said each object in the set of objects: obtaining a base address from the table for the object of the absolute reference; computing an offset for an offset-based reference by subtracting the base address of the object from the absolute reference; applying an offset-based patch to the set of objects and to the location structure using a binary-patching technique; and converting the references in the set of objects from offset-based references back into absolute references, wherein said absolute references are stored in place of said offsets; wherein using the offset-based patch reduces the number of reference changes that need to be specified in the patch, and hence reduces the size of the patch.