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.