Linker and Libraries Guide

64-bit SPARC: Relocation Types

The following notation, used in relocation calculation, is unique to 64–bit SPARC.

O

The secondary addend used to compute the value of the relocation field. This addend is extracted from the r_info field by applying the ELF64_R_TYPE_DATA macro.

The relocations that are listed in the following table extend, or alter, the relocations defined for 32–bit SPARC. See SPARC: Relocation Types.

Table 7–14 64-bit SPARC: ELF Relocation Types

Name 

Value 

Field 

Calculation 

R_SPARC_HI22

9

V-imm22

(S + A) >> 10

R_SPARC_GLOB_DAT

20

V-xword64

S + A

R_SPARC_RELATIVE

22

V-xword64

B + A

R_SPARC_64

32

V-xword64

S + A

R_SPARC_OLO10

33

V-simm13

((S + A) & 0x3ff) + O

R_SPARC_DISP64

46

V-xword64

S + A - P

R_SPARC_PLT64

47

V-xword64

L + A

R_SPARC_REGISTER

53

V-xword64

S + A

R_SPARC_UA64

54

V-xword64

S + A

R_SPARC_H34

85

V-imm22

(S + A) >> 12

R_SPARC_SIZE64

87

V-xword64

Z + A

The following relocation type has semantics beyond simple calculation.

R_SPARC_OLO10

Resembles R_SPARC_LO10, except that an extra offset is added to make full use of the 13-bit signed immediate field.