SPARC: Relocation Types
Field names in the following table tell whether the relocation type checks for
overflow
. A calculated relocation value can be larger than the
intended field, and a relocation type can verify (V
) the value fits or
truncate (T
) the result. As an example, V-simm13
means that the computed value can not have significant, nonzero bits outside the
simm13
field.
Table 14-16 SPARC: ELF Relocation Types
Name | Value | Field | Calculation |
---|---|---|---|
|
|
None |
None |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
None |
Refer to the explanation following this table. |
|
|
|
|
|
|
None |
Refer to the explanation following this table. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Refer to the explanation following this table. |
|
|
|
|
|
|
|
|
Note:
Additional relocations are available for thread-local storage references. These relocations are covered in Thread-Local Storage.Some relocation types have semantics beyond simple calculation.
-
R_SPARC_GOT10
-
Resembles
R_SPARC_LO10
, except that the relocation refers to the address of the symbol'sGOT
entry. Additionally,R_SPARC_GOT10
instructs the link-editor to create a global offset table. -
R_SPARC_GOT13
-
Resembles
R_SPARC_13
, except that the relocation refers to the address of the symbol'sGOT
entry. Additionally,R_SPARC_GOT13
instructs the link-editor to create a global offset table. -
R_SPARC_GOT22
-
Resembles
R_SPARC_22
, except that the relocation refers to the address of the symbol'sGOT
entry. Additionally,R_SPARC_GOT22
instructs the link-editor to create a global offset table. -
R_SPARC_WPLT30
-
Resembles
R_SPARC_WDISP30
, except that the relocation refers to the address of the symbol's procedure linkage table entry. Additionally,R_SPARC_WPLT30
instructs the link-editor to create a procedure linkage table. -
R_SPARC_COPY
-
Created by the link-editor for dynamic executables to preserve a read-only text segment. The relocation offset member refers to a location in a writable segment. The symbol table index specifies a symbol that should exist both in the current object file and in a shared object. During execution, the runtime linker copies data associated with the shared object's symbol to the location specified by the offset. See Copy Relocations.
-
R_SPARC_GLOB_DAT
-
Resembles
R_SPARC_32
, except that the relocation sets aGOT
entry to the address of the specified symbol. The special relocation type enables you to determine the correspondence between symbols andGOT
entries. -
R_SPARC_JMP_SLOT
-
Created by the link-editor for dynamic objects to provide lazy binding. The relocation offset member gives the location of a procedure linkage table entry. The runtime linker modifies the procedure linkage table entry to transfer control to the designated symbol address.
-
R_SPARC_RELATIVE
-
Created by the link-editor for dynamic objects. The relocation offset member gives the location within a shared object that contains a value representing a relative address. The runtime linker computes the corresponding virtual address by adding the virtual address at which the shared object is loaded to the relative address. Relocation entries for this type must specify a value of zero for the symbol table index.
-
R_SPARC_UA32
-
Resembles
R_SPARC_32
, except that the relocation refers to an unaligned word. The word to be relocated must be treated as four separate bytes with arbitrary alignment, not as a word aligned according to the architecture requirements. -
R_SPARC_LM22
-
Resembles
R_SPARC_HI22
, except that the relocation truncates rather than validates. -
R_SPARC_PC_LM22
-
Resembles
R_SPARC_PC22
, except that the relocation truncates rather than validates. -
R_SPARC_HIX22
-
Used with
R_SPARC_LOX10
for executables that are confined to the uppermost 4 gigabytes of the 64-bit address space. Similar toR_SPARC_HI22
, but supplies ones complement of linked value. -
R_SPARC_LOX10
-
Used with
R_SPARC_HIX22
. Similar toR_SPARC_LO10
, but always sets bits 10 through 12 of the linked value. -
R_SPARC_L44
-
Used with the
R_SPARC_H44
andR_SPARC_M44
relocation types to generate a 44-bit absolute addressing model. -
R_SPARC_REGISTER
-
Used to initialize a register symbol. The relocation offset member contains the register number to be initialized. A corresponding register symbol must exist for this register. The symbol must be of type
SHN_ABS
. -
R_SPARC_GOTDATA_OP_HIX22
,R_SPARC_GOTDATA_OP_LOX10
, andR_SPARC_GOTDATA_OP
-
These relocations provide for code transformations.