Method and apparatus for efficiently resolving symbolic references in a virtual machine
First Claim
1. A method for resolving symbolic references in a virtual machine to support in-place execution, comprising:
- loading an in-place executable file into the virtual machine;
receiving a pointer that points to an unresolved symbol value in the in-place executable file, wherein the unresolved symbol value comprises an offset value that points to a subsequent unresolved symbol value in a chain of unresolved symbol values within the in-place executable file, and a token value that can be used to look up a corresponding resolved reference value in an unresolved symbol table;
using the token value to look up the corresponding resolved reference in the unresolved symbol table;
replacing the unresolved symbol value with the corresponding resolved reference; and
wherein the unresolved symbol value additionally includes a flag, wherein if the flag is set, the method additionally involves;
reading the memory location immediately following the unresolved symbol value for a supplemental unresolved symbol value, wherein the supplemental unresolved symbol value includes a supplemental flag, a supplemental token value, and a supplemental offset value;
adding the token value and the supplemental token value to create a combined token value that can be used to look up the corresponding resolved reference in the unresolved symbol table; and
adding the offset value and the supplemental offset value to create a combined offset value that can be used to locate the subsequent unresolved symbol value.
2 Assignments
0 Petitions
Accused Products
Abstract
One embodiment of the present invention provides a system that facilitates efficiently resolving symbolic references in a virtual machine to support in-place execution. During operation, the system loads an in-place executable file into the virtual machine, and receives a pointer that points to an unresolved symbol value in the in-place executable file. This unresolved symbol value includes an offset value that points to a subsequent unresolved symbol value in a chain of unresolved symbol values within the in-place executable file, and a token value that can be used to look up a corresponding resolved reference value in an unresolved symbol table. The system then uses the token value to look up the corresponding resolved reference in the unresolved symbol table, and replaces the unresolved symbol value with the corresponding resolved reference.
20 Citations
27 Claims
-
1. A method for resolving symbolic references in a virtual machine to support in-place execution, comprising:
-
loading an in-place executable file into the virtual machine; receiving a pointer that points to an unresolved symbol value in the in-place executable file, wherein the unresolved symbol value comprises an offset value that points to a subsequent unresolved symbol value in a chain of unresolved symbol values within the in-place executable file, and a token value that can be used to look up a corresponding resolved reference value in an unresolved symbol table; using the token value to look up the corresponding resolved reference in the unresolved symbol table; replacing the unresolved symbol value with the corresponding resolved reference; and wherein the unresolved symbol value additionally includes a flag, wherein if the flag is set, the method additionally involves; reading the memory location immediately following the unresolved symbol value for a supplemental unresolved symbol value, wherein the supplemental unresolved symbol value includes a supplemental flag, a supplemental token value, and a supplemental offset value; adding the token value and the supplemental token value to create a combined token value that can be used to look up the corresponding resolved reference in the unresolved symbol table; and adding the offset value and the supplemental offset value to create a combined offset value that can be used to locate the subsequent unresolved symbol value. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method for resolving symbolic references in a virtual machine to support in-place execution, the method comprising:
-
loading an in-place executable file into the virtual machine; receiving a pointer that points to an unresolved symbol value in the in-place executable file, wherein the unresolved symbol value comprises an offset value that points to a subsequent unresolved symbol value in a chain of unresolved symbol values within the in-place executable file, and a token value that can be used to look up a corresponding resolved reference value in an unresolved symbol table; using the token value to look up the corresponding resolved reference in the unresolved symbol table; and replacing the unresolved symbol value with the corresponding resolved reference; and wherein the unresolved symbol value additionally includes a flag, wherein if the flag is set, the method additionally involves reading the memory location immediately following the unresolved symbol value for a supplemental unresolved symbol value, wherein the supplemental unresolved symbol value includes a supplemental flag, a supplemental token value, and a supplemental offset value; adding the token value and the supplemental token value to create a combined token value that can be used to look up the corresponding resolved reference in the unresolved symbol table; and adding the offset value and the supplemental offset value to create a combined offset value that can be used to locate the subsequent unresolved symbol value. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17, 18)
-
-
19. An apparatus having a processor for resolving symbolic references in a virtual machine to support in-place execution, comprising:
-
a loading mechanism configured to load an in-place executable file into the virtual machine; a receiving mechanism configured to receive a pointer that points to an unresolved symbol value in the in-place executable file, wherein the unresolved symbol value comprises an offset value that points to a subsequent unresolved symbol value in a chain of unresolved symbol values within the in-place executable file, a token value that can be used to look up a corresponding resolved reference value in an unresolved symbol table, and a flag; a look up mechanism configured to use the token value to look up the corresponding resolved reference in the unresolved symbol table; a replacement mechanism configured to replace the unresolved symbol value with the corresponding resolved reference; a reading mechanism configured to read the memory location immediately following the unresolved symbol value for a supplemental unresolved symbol value, wherein the supplemental unresolved symbol value includes a supplemental flag, a supplemental token value, and a supplemental offset value; a token adding mechanism configured to add the token value and the supplemental token value to create a combined token value that can be used to look up the corresponding resolved reference in the unresolved symbol table; an offset adding mechanism configured to add the offset value and the supplemental offset value to create a combined offset value that can be used to locate the subsequent unresolved symbol value; and wherein the reading mechanism, the token adding mechanism, and the offset adding mechanism are configured to operate if the flag is set. - View Dependent Claims (20, 21, 22, 23, 24, 25, 26, 27)
-
Specification