Patent ID: 7603665

Claim:
A method for loading an in-place executable file into a virtual machine, comprising: loading the in-place executable file into the virtual machine, wherein the in-place executable file contains internal pointers that point to memory locations within the in-place executable file, and a target memory address that specifies a target location in memory where the in-place executable file is configured to be loaded; determining an actual memory address at which the in-place executable file is actually loaded; if the actual memory address and the target memory address are different, generating an offset value, which is the difference between the actual memory address and the target memory address, and adjusting each internal pointer within the in-place executable file by the offset value so that the internal pointers point to intended locations inside the in-place executable file; wherein the in-place executable file includes a relocation table that identifies the locations of internal pointers within the in-place executable file, wherein the relocation table is structured as a list of offset ranges, wherein each offset range includes a starting address and an ending address of a contiguous set of internal pointers within the in-place executable file; and wherein the relocation table is removed from the in-place executable file when the in-place executable file is loaded into the virtual machine.