TNS/E Native Object Files
eld Manual—527255-009
A-22
Relocation Tables
subtracting the value of the GP register for this loadfile from the address of this local
function descriptor.
This relocation table entry is not present in loadfiles. The linker would instead
generate a relocation table entry of type R_IA_64_IPLTMSB to describe the local
function descriptor.
R_IA_64_FPTRx
-- Virtual Address of an Official Function Descriptor
This applies to the situation when a data item is initialized with the address of a
procedure. This is a procedure pointer, so it must contain the address of the official
function descriptor for that procedure. The compiler or assembler would create this
kind of relocation table entry to describe such a relocation site, and the linker would
propagate it into loadfiles, so it could be modified at runtime.
The R_IA_64_FPTR64MSB version of this type of relocation table entry (i.e., the 64-bit
variety) is also created by the linker in loadfiles to tell what address should be in a .got
section entry at runtime, when that .got entry is to contain the address of an official
function descriptor.
R_IA_64_PCRELx
-- IP-Relative Address
This applies to the situation when there is a direct procedure call (or another type of
branch) and the compiler or assembler has generated an IP-relative procedure call
instruction, which uses an operand within the instruction as an offset to the target
procedure relative to the location of the bundle containing the instruction itself. The
four variations of this relocation type correspond to four instruction varieties that can be
used for this. In all cases, the target address is the address of a bundle, which is a
multiple of 16, so four 0's are appended to the end of the operand. The 21-bit forms
are signed quantities that can therefore cover a region of 225 bytes, or 16 megabytes
forward or backward, while the 60-bit form can reach any 64-bit address.
It is only correct to use IP-relative addressing in a loadfile if the target address can be
guaranteed to be in the same loadfile. Also, we do not use IP-relative addressing to
make a call on a gateway in a DLL, because the -alf option can separately rebase the
code and the gateway segment. The linker does one of two different things, depending
upon whether it can make these two guarantees.
If the linker can guarantee that IP-relative addressing will work, it fills in the operand so
that, when four 0's are attached to it, it will equal the address of the target minus the
address of the bundle containing the current instruction. In this case, no relocation
table entry remains in the loadfile.
If the linker cannot guarantee this, then the linker will allocate an import stub in the .plt
section. The import stub will make the procedure call, using a local function descriptor
similar to what was described above when the compiler or assembler generated the
R_IA_64_PLTOFF22 type of relocation table entry. The linker updates the operand in
the instruction so that, when four 0's are attached to it, it will equal the address of the
import stub minus the address of the bundle containing the current instruction. As
described above under R_IA_64_PLTOFF22, the loadfile would contain a relocation
table entry of type R_IA_64_IPLTMSB to describe the local function descriptor.
Содержание eld
Страница 4: ......
Страница 8: ...Contents eld Manual 527255 009 iv ...
Страница 12: ...What s New in This Manual eld Manual 527255 009 viii Changes to the 527255 005 Manual ...
Страница 34: ...Introduction to eld eld Manual 527255 009 1 14 Example of Use ...
Страница 54: ...eld Input and Output eld Manual 527255 009 2 20 Using Archives ...
Страница 98: ...Other eld Processing eld Manual 527255 009 4 20 Merging Source RTDUs ...
Страница 242: ...Output Listings and Error Handling eld Manual 527255 009 6 132 Glossary of Errors ...