Method for generating shared library executable code with lazy global offset table address calculation
AssigneeInternational Business Machines Corporation
InventorAhmed Mohammed Gheith
Life of this patent
Estimating the term…
Loading patent…
AssigneeInternational Business Machines Corporation
InventorAhmed Mohammed Gheith
Estimating the term…
A process for transforming source code into efficient shared library executable code in which global offset table address values are computed only when needed by a function. A condition register and current global offset table address register are added to the code by the compiler. The condition register controls recalculation of the global offset table address. The current global offset table register is saved and the condition register is invalidated by the calling function prior to branching to the new function. The new function calculates the global offset address value only if it is needed. The intermediate code generated by the compiler includes specific routines to process local function calls, function calls by pointer, and external function calls. The system efficiency is improved whenever the actual global offset table access is infrequent compared to function calls across module boundaries. Postponement of global offset table address calculation until the value is needed then frequently avoids the calculation altogether. Condition register setting and current register saving instructions are inserted into otherwise idle cycles in the preferred embodiment.
A method for improving executable code runtime performance during source code compilation, the source code including a plurality of statements of which some, all or none of said statements access executable functions that reside external to the said source code module, each executable function having a function name and a function entry point, in executable modules external to said source code, the method comprising the steps of:
A method of compiling a plurality of source code functions into an executable module, where program code is inserted to delay runtime global offset table address computation in a function until the global offset table address is required to resolve a reference to an executable function that resides external to the source module, the compiling performed in a computer system having a processor and memory, the method comprising:
A computer program product having a computer readable medium having computer program logic recorded thereon for improving executable code runtime performance during source code compliation, the source code including a plurality of statements, of which some, all or none access executable functions that reside external to the source code module, each executable function having a function name and a function entry point, said computer program product comprising:
Dependencies are inferred from the claim text.