IP Library › Granted Patent US 9,395,964
Granted Patent B2
US 9,395,964 · App. 14/527,819 · Granted Jul 19, 2016

Rewriting symbol address initialization sequences

Inventors: Michael Karl Gschwind (Chappaqua, NY); Ulrich Weigand (Holzgerlingen, DE)
Assignee: International Business Machines Corporation
G06F8/54
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,395,964
App. No.
14/527,819
Granted
Jul 19, 2016
Kind
B2
Abstract

A system includes a memory to store a linker and one or modules, and a processor, communicatively coupled to the memory. The computer system is configured to recognize a first symbol address initialization sequence in a module. The system determines whether the first symbol address initialization sequence is a candidate for replacement, determines whether to replace the first symbol address initialization sequence with a second symbol address initialization sequence, and replaces the first symbol address initialization sequence with the second symbol address instruction sequence when it is determined to replace the first symbol address initialization sequence with the second symbol address initialization sequence.

Claims (16)

1. A computer program product for linking object code, the computer program product comprising:

a computer readable storage medium having program instructions embodied therewith, the program instructions readable by a processing circuit to cause the processing circuit to:

recognize a first symbol address initialization sequence in a first module as corresponding with a pre-defined symbol address initialization sequence, the first symbol address initialization sequence including one or more instructions for loading an address in a first register of a processor, the one or more instructions including an instruction that depends on a value stored in a second register of the processor, the first register for storing an address of a table of contents (TOC) and the second register for storing a starting address of the module;

determine whether to replace the first symbol address initialization sequence with a second symbol address initialization sequence by determining whether a first condition is satisfied, the first condition including that the second symbol address initialization sequence has a second processor resource usage that is less than a first processor resource usage associated with the first symbol address initialization sequence; and

replace the first symbol address initialization sequence with the second symbol address instruction sequence when it is determined that the first condition is satisfied.

2. The computer program product of claim 1 , wherein the module includes position independent code (PIC), the first symbol address initialization sequence is configured for use with position independent code (PIC), and the second symbol address initialization sequence is configured for use with position dependent code (PDC).

3. The computer program product of claim 1 , wherein the first condition further includes determining whether a target address of the first symbol address initialization sequence is within a first or last 2 GB of a 64-bit address space, and wherein the first condition is satisfied when the target address of the first symbol address initialization sequence is within the first or last 2 GB of a 64-bit address space, and the second processor resource usage is less than the first processor resource usage.

4. A computer system for linking object code, the system comprising:

a memory to store a linker and one or modules; and

a processor, communicatively coupled to the memory, the computer system configured to:

recognize a first symbol address initialization sequence in a first module as corresponding with a pre-defined symbol address initialization sequence, the first symbol address initialization sequence including one or more instructions for loading an address in a first register of a processor, the one or more instructions including an instruction that depends on a value stored in a second register of the processor, the first register for storing an address of a table of contents (TOC) and the second register for storing a starting address of the module;

determine whether to replace the first symbol address initialization sequence with a second symbol address initialization sequence by determining whether a first condition is satisfied, the first condition including that the second symbol address initialization sequence has a second processor resource usage that is less than a first processor resource usage associated with the first symbol address initialization sequence; and

replace the first symbol address initialization sequence with the second symbol address instruction sequence when it is determined that the first condition is satisfied.

5. The system of claim 4 , wherein the recognizing of the first symbol address initialization sequence in the module includes determining that the first symbol address initialization sequence is between a first entry point and a second entry point of a function and the first symbol address instruction sequence includes one or more instructions for loading an address in a table of contents (TOC) register.

6. The system of claim 4 , wherein the first module includes position independent code (PIC), the first symbol address initialization sequence is configured for use with position independent code (PIC), and the second symbol address initialization sequence is configured for use with position dependent code (PDC).

7. The system of claim 4 , wherein the first condition further includes determining whether a target address of the first symbol address initialization sequence is within a first or last 2 GB of a 64-bit address space, and wherein the first condition is satisfied when the target address of the first symbol address initialization sequence is within the first or last 2 GB of a 64-bit address space, and the second processor resource usage is less than the first processor resource usage.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 30, 2014
From: GSCHWIND, MICHAEL KARL; WEIGAND, ULRICH
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 034067/0473 →
Continuity (1)
Related Publication 20160124733A1 · May 5, 2016