System and method for flexible software linking
First Claim
Patent Images
1. A method, comprising:
- locating a symbol reference to a symbol in a first software module, the first software module including at least one instruction using the symbol reference;
parsing a symbol table to locate an entry for the symbol, the entry for the symbol including a symbol value;
creating the entry for the symbol in the symbol table when the parsing does not locate the entry for the symbol in the symbol table, the entry for the symbol including a pending indication and a default value as the symbol value; and
changing the at least one instruction using the symbol reference based on the default value.
1 Assignment
0 Petitions
Accused Products
Abstract
A loading and linking process allows for the flexible loading and linking of software modules into a memory space, without regard to the order in which symbols are defined and referenced in such software modules, and without generating dangling references. An unloading process allows for software module unloading/unlinking from an already linked set of software modules, also without generating dangling references. A loading/linking system may be used to perform these processes.
-
Citations
23 Claims
-
1. A method, comprising:
-
locating a symbol reference to a symbol in a first software module, the first software module including at least one instruction using the symbol reference;
parsing a symbol table to locate an entry for the symbol, the entry for the symbol including a symbol value;
creating the entry for the symbol in the symbol table when the parsing does not locate the entry for the symbol in the symbol table, the entry for the symbol including a pending indication and a default value as the symbol value; and
changing the at least one instruction using the symbol reference based on the default value. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
locating a symbol definition for the symbol in a second software module, the symbol definition including a symbol value definition;
parsing the symbol table to locate the entry for the symbol;
editing the entry for the symbol in the symbol table when the parsing locates the entry for the symbol and the entry for the symbol includes the pending indication, including removing the pending indication and changing the symbol value to the symbol value definition; and
changing the at least one instruction using the symbol reference based on the symbol value.
-
-
4. The method of claim 3, wherein the entry for the symbol includes a reference data structure indicating a location of the at least one instruction using the symbol reference, and wherein the location of the at least one instruction using the symbol reference is used in the changing of the at least one instruction using the symbol reference based on the symbol value.
-
5. The method of claim 3, further comprising:
loading the first software module into a first portion of a memory space having a first set of memory locations and the second software module into a second portion of the memory space having a second set of memory locations.
-
6. The method of claim 5, further comprising:
-
relocating the first software module based on the first set of memory locations; and
relocating the second software module based on the second set of memory locations.
-
-
7. The method of claim 6, wherein the symbol value includes an unrelocated value and a base address, and wherein the base address is determined based on the relocation of the second software module.
-
8. The method of claim 1, further comprising:
-
retrieving a symbol value associated with the symbol from the entry for the symbol when the entry for the symbol is located in the symbol table; and
inserting the symbol value into the at least one instruction using the symbol reference when the entry for the symbol is located in the symbol table.
-
-
9. The method of claim 1, wherein the changing of the at least one instruction using the symbol reference based on the default value comprises inserting the default value into the at least one instruction using the symbol reference.
-
10. The method of claim 1, wherein the changing of the at least one instruction using the symbol reference based on the default value comprises computing a relocated default value based on the default value and inserting the relocated default value into the at least one instruction using the symbol reference.
-
11. A method, comprising:
-
unloading a software module from a set of linked software modules;
parsing a symbol table to locate at least one symbol table entry associated with a symbol defined by the software module, the at least one symbol table entry including a symbol value and a reference data structure of a number of locations using the symbol;
changing the symbol value to a default value;
including in the at least one symbol table entry a pending indication; and
changing the number of locations using the symbol based on the default value. - View Dependent Claims (12, 13)
parsing the symbol table to locate at least one symbol table entry associated with a symbol referenced by the software module, the at least one symbol table entry associated with the symbol referenced by the software module including a reference data structure including a number of addresses to locations within the software module using the symbol; and
removing from the reference data structure of the at least one symbol table entry associated with the symbol referenced by the software module the number of addresses to locations within the software module using the symbol.
-
-
13. The method of claim 12, further comprising:
removing the at least one symbol table entry associated with the symbol referenced by the software module when the reference data structure is empty and the at least one symbol table entry associated with the symbol referenced by the software module includes a pending indication.
-
14. A system, comprising:
-
a first computing environment including a linker; and
a number of symbol table entries, each of the number of symbol table entries corresponding to a symbol and including a symbol value and an indicator of whether the symbol is pending;
wherein the linker is coupled to the symbol table to use the symbol table to link a number of software modules loaded into a memory space. - View Dependent Claims (15, 16, 17, 18, 19, 20, 21, 22, 23)
a software module list including a number of software module entries, each of the number of software module entries corresponding to one of the number of software modules loaded into the memory space.
-
-
17. The system of claim 16, wherein each of the number of software module entries includes an indicator of whether the corresponding software module has been completely linked.
-
18. The system of claim 14, wherein the memory space is a virtual memory space.
-
19. The system of claim 14, wherein the first computing environment is a software development environment.
-
20. The system of claim 19, wherein the memory space is an intended memory space for a second computing environment.
-
21. The system of claim 14, wherein the linker includes a loader to load the number of software modules into the memory space.
-
22. The system of claim 14, further comprising a link status information data structure coupled to the linker and including a number of link status entries corresponding to the number of software modules loaded into the memory space respectively.
-
23. The system of claims 22, wherein each of the link status entries for a corresponding software module includes fields for undefined symbols used in the corresponding software module and addresses for memory locations using the undefined symbols.
Specification