EP1622013A2

Method and apparatus for resolving symbolic references in a virtual machine

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.

EP1622013A2, drawing sheet 1
Sheet 1 of 3

Term

Term ended

Projected expiry passed 14 June 2025, 1.3 years ago.

  1. Priority
  2. Filed
  3. Published
  4. Projected expiry
  5. Today

14 claims: 7 independent, 7 dependent

  1. 1
    A method for efficiently 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;and replacing the unresolved symbol value with the corresponding resolved reference.
  2. 4
    The method of any preceding claim, 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.
  3. 6
    The method of any preceding claim, wherein the unresolved symbol value is the last unresolved symbol value in the in-place executable file and subsequent unresolved symbol values are organized in descending order from the end of the in-place executable file to the beginning of the in-place executable file.
  4. 7
    The method of any of claims 1 to 5, wherein the unresolved symbol value is the first unresolved symbol value in the in-place executable file and subsequent unresolved symbol values are organized in ascending order from the beginning of the in-place executable file to the end of the in-place executable file.
  5. 8
    The method of any preceding claim, wherein receiving the pointer further comprises retrieving the pointer from the header of the in-place executable file.
  6. 9
    The method of any preceding claim, wherein the virtual machine is a platform-independent virtual machine.
  7. 11
    A computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method for efficiently 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.
  8. 12
    Apparatus for efficiently 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, and a token value that can be used to look up a corresponding resolved reference value in an unresolved symbol table;a look up mechanism configured to use the token value to look up the corresponding resolved reference in the unresolved symbol table;and a replacement mechanism configured to replace the unresolved symbol value with the corresponding resolved reference.
  9. 13
    A computer program for implementing the method of any of claims 1 to 10.
  10. 14
    Apparatus for implementing the method of any of claims 1 to 10.