HP eld Manual page 262

Table of Contents

Advertisement

TNS/E Native Object Files
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.
eld Manual—527255-009
A-20

Advertisement

Table of Contents
loading

Table of Contents