The table below lists and describes the link-relocation operators and their usage. Unless otherwise specified, the usage is for both COFF and ELF formats.
Operator |
Generates a Relocation For: |
Usage |
@dtpmod(expr) |
The current instruction requests the linker to put the load module index for expr. It is used in dynamically-bound programs. |
data8 statement in ELF format. |
@dtprel(expr) |
The current instruction or data object that calculates the static dtv-relative offset to the address given by expr. It is used in dynamically-bound programs. |
The adds, addl, and movl instructions and data8 statement in ELF format. |
@gprel(expr) |
The current instruction or data object that calculates the gp-relative offset to the address given by expr. |
The addl instruction, and data8 (and data4 in ELF format) statements. |
@ltoff(expr)
|
The current instruction that instructs the linker to create a linkage table entry for expr, and calculates the gp-relative offset to the new linkage table entry. |
add long immediate instructions. |
@ltoff(@dtpmod(expr)) |
The current instruction requests the linker to allocate a linkage table entry to hold the load module index for expr. The linker processes this relocation by substituting the gp-relative offset for the new linkage table entry. It is used in dynamically- bound programs. |
The add long immediate instruction in ELF format. |
@ltoff(@dtprel(expr)) |
The current instruction that instructs the linker to create a linkage table entry to hold the dtv-relative offset for expr and calculates the gp-relative offset to the new linkage table entry. It is used in dynamically-bound programs. |
The add long immediate instruction in ELF format. |
@ltoff(@tprel(expr)) |
The current instruction that instructs the linker to create a linkage table entry to hold the tp-relative offset for expr, and calculates the gp-relative offset to the new linkage table entry. It is used in statically-bound programs. |
The add long immediate instruction in ELF format. |
@ltoffx(expr) |
The current instruction that instructs the linker to create a linkage table entry for expr, and calculates the gp-relative offset to the new linkage table entry. It is used to support link-time rewriting of the indirect addressing code sequences. |
The add long immediate instruction in ELF format. |
@secrel(expr) |
The current data object that calculates the offset, relative to the beginning of the section, to the address given by expr. |
data4 and data8 statements, and the addl instruction. |
@segrel(expr)
|
The current data object that calculates the offset, relative to the beginning of the segment, to the address given by expr. |
data4 and data8 statements, in ELF format. |
@imagerel(expr) |
The current data object that calculates the offset, relative to the beginning of the image, to the address given by expr. |
data4 statements, in COFF format. |
@fptr(sym)
|
The current instruction or data object that calculates the address of the official plabel descriptor for the symbol sym, which must be a procedure label (function descriptor) name. |
data4 and data8 statements, and move long immediate instructions. Requires function symbol in COFF format. It can be used in add long immediate instructions when combined with the @ltoff operator in the @ltoff(@fptr(sym)form. |
@pltoff(sym)
|
The current instruction or data object that calculates the gp-relative offset to the procedure linkage table entry for the symbol sym, which must be a function name. |
data8 statements and add long immediate instructions. The PLT entry referenced by this operator should be used only for a direct procedure call. It does not serve as a function descriptor name. |
@iplt(sym)
|
The current data object that calculates the plabel descriptor for the symbol sym, which must be a procedure label (function descriptor) name. |
data16 statements in ELF format. |
@ltv(expr) |
The current data object that calculates the address of the relocatable expression expr, with one exception; while it is expected that the addresses created will need further relocation at run-time, the linker should not create a corresponding relocation in the output executable or shared object file. The run-time consumer of the information provided is expected to relocate these values. |
data4 statements in ELF format. |
@section(sec) |
The current data object that provides the section header number of section sec. Used for debug information. |
data2 statements in COFF format. |
@tprel(expr)
|
The current instruction or data object that calculates the tp-relative offset to the address given by expr. It is used in statically-bound programs. |
The adds, addl, and movl instructions and data8 statement in ELF format. |