Name
Value
Overflow
check
(45)
Relocated Address
R
Bit Mask
M
Bit Shift
B
R_NIOS2_CALL26_NOAT
41
No
(S + A) >> 2
0xFFFFFFC0
6
R_NIOS2_IMM5
5
Yes
(S + A) & 0x1F
0x000007C0
6
R_NIOS2_CACHE_OPX
6
Yes
(S + A) & 0x1F
0x07C00000
22
R_NIOS2_IMM6
7
Yes
(S + A) & 0x3F
0x00000FC0
6
R_NIOS2_IMM8
8
Yes
(S + A) & 0xFF
0x00003FC0
6
R_NIOS2_HI16
9
No
((S + A) >> 16) &
0xFFFF
0x003FFFC0
6
R_NIOS2_LO16
10
No
(S + A) & 0xFFFF
0x003FFFC0
6
R_NIOS2_HIADJ16
11
No
Adj(S+A)
0x003FFFC0
6
R_NIOS2_BFD_RELOC_32
12
No
S + A
0xFFFFFFFF
0
R_NIOS2_BFD_RELOC_16
13
Yes
(S + A) & 0xFFFF
0x0000FFFF
0
R_NIOS2_BFD_RELOC_8
14
Yes
(S + A) & 0xFF
0x000000FF
0
R_NIOS2_GPREL
15
No
(S + A – GP) & 0xFFFF
0x003FFFC0
6
R_NIOS2_GNU_VTINHERIT
16
n/a
None
n/a
n/a
R_NIOS2_GNU_VTENTRY
17
n/a
None
n/a
n/a
R_NIOS2_UJMP
18
No
((S + A) >> 16) &
0xFFFF,
(S + A + 4) & 0xFFFF
0x003FFFC0
6
R_NIOS2_CJMP
19
No
((S + A) >> 16) &
0xFFFF,
(S + A + 4) & 0xFFFF
0x003FFFC0
6
R_NIOS2_CALLR
20
No
((S + A) >> 16) &
0xFFFF)
(S + A + 4) & 0xFFFF
0x003FFFC0
6
R_NIOS2_ALIGN
21
n/a
None
n/a
n/a
R_NIOS2_GOT16
22
(
47
)
Yes
G
0x003FFFC0
6
R_NIOS2_CALL16
23
(
47
)
Yes
G
0x003FFFC0
6
R_NIOS2_GOTOFF_LO
24
(
47
)
No
(S + A – GOT) &
0xFFFF
0x003FFFC0
6
R_NIOS2_GOTOFF_HA
25
(
47
)
No
Adj (S + A – GOT)
0x003FFFC0
6
R_NIOS2_PCREL_LO
26
(
47
)
No
(S + A – PC) & 0xFFFF
0x003FFFC0
6
R_NIOS2_PCREL_HA
27
(
47
)
No
Adj (S + A – PC)
0x003FFFC0
6
R_NIOS2_TLS_GD16
28
(
47
)
Yes
Refer to Thread-Local
Storage section
0x003FFFC0
6
R_NIOS2_TLS_LDM16
29
(
47
)
Yes
Refer to Thread-Local
Storage section
0x003FFFC0
6
continued...
(45)
For relocation types where no overflow check is performed, the relocated address is truncated
to fit the instruction.
7. Application Binary Interface
NII-PRG | 2018.04.18
Nios II Processor Reference Guide
155