TNS/E Native Object Files
eld Manual—527255-009
A-20
Relocation Tables
R_IA_64_IMM64
-- Virtual Address of a Symbol in Code
This applies to the situation when the compiler or assembler knew that it was compiling
code that would not be moved at runtime and that the referenced symbol would also be
within the same loadfile and could not be preempted at runtime. In this case, the
compiler or assembler can generate (non-PIC) code where the virtual address of a
symbol is placed directly into the code. The linker would fill in the relocation site with
the virtual address, and the same relocation table entry would also appear in the
loadfile, so that the site could be updated by the -alf option of the linker if necessary.
R_IA_64_DIRx
-- Virtual Address of a Data Item in Data (and a few other things)
This usually applies to the situation when a data item is initialized with the address of
another data item. 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 object file format does not prohibit a data item from being initialized with the real
address of a procedure, as opposed to the address of the official function descriptor for
the procedure, and in that case this same relocation type would be used.
The R_IA_64_DIR64MSB 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 a data item or
the address of an EnterPriv label.
The R_IA_64_DIRx relocation types are also used in linkfiles to identify addresses that
are stored in the DWARF symbol table sections.
R_IA_64_GPREL22
-- 22-Bit GP-Relative Address of a Data Item
This applies to the situation when the code has a reference to a data item, and the
compiler or assembler knows that the data item will have to be found within the same
loadfile, and the compiler or assembler has allocated the data item in the .sdata,
.srdata, or .sbss section, and refers to it by 22-bit GP-relative addressing. It is an error
if the linker cannot guarantee that the target symbol is resolved in the same loadfile, or
that its address cannot be reached by 22-bit GP-relative addressing.
The compiler or assembler would generate code that calculates the address of the
data item by adding the signed 22-bit offset to the GP-register. The linker would fill in
that 22-bit operand by subtracting the value of the GP register for this loadfile from the
address of the data item. The relocation table entry would not exist in the resulting
loadfile.
R_IA_64_GPREL64I
-- 64-Bit GP-Relative Address of a Data Item
This applies to the situation when the code has a reference to a data item, and the
compiler or assembler knows that the data item will have to be found within the same
loadfile, and the compiler or assembler refers to it by 64-bit GP-relative addressing. It
is an error if the linker cannot guarantee that the target symbol is resolved in the same
loadfile.
Summary of Contents for eld
Page 4: ......
Page 8: ...Contents eld Manual 527255 009 iv ...
Page 12: ...What s New in This Manual eld Manual 527255 009 viii Changes to the 527255 005 Manual ...
Page 34: ...Introduction to eld eld Manual 527255 009 1 14 Example of Use ...
Page 54: ...eld Input and Output eld Manual 527255 009 2 20 Using Archives ...
Page 98: ...Other eld Processing eld Manual 527255 009 4 20 Merging Source RTDUs ...
Page 242: ...Output Listings and Error Handling eld Manual 527255 009 6 132 Glossary of Errors ...