Abi For Linux Systems - Altera Nios II User Manual

Hide thumbs Also See for Nios II:
Table of Contents

Advertisement

7–10
Table 7–4. Nios II Relocation Calculation (Part 3 of 3)
Name
R_NIOS2_COPY
(3)
R_NIOS2_GLOB_DAT
(3)
R_NIOS2_JUMP_SLOT
(3)
R_NIOS2_RELATIVE
(3)
R_NIOS2_GOTOFF
(3)
Notes to
Table
7–4:
(1) For relocation types where no overflow check is performed, the relocated address is truncated to fit the instruction.
(2) Expressions in this column use the following conventions:
S: Symbol address
A: Addend
PC: Program counter
GP: Global pointer
Adj(X): (((X >> 16) & 0xFFFF) + ((X >> 15) & 0x1)) & 0xFFFF
BA: The base address at which a shared library is loaded
GOT: The value of the Global Offset Table (GOT) pointer (Linux only)
G: The offset into the GOT for the GOT slot for symbol S (Linux only)
(3) Relocation support is provided for Linux systems.
With the information in
manipulating it as an unsigned 32-bit integer, as follows:
Xr = (( R << B ) & M | ( X & ~M ));
where:
R is the relocated address, calculated as listed in
B is the bit shift listed in
M is the bit mask listed in
X is the original instruction
Xr is the relocated instruction

ABI for Linux Systems

This section describes details specific to Linux systems beyond the Linux-specific
information in
Nios II Processor Reference Handbook
Overflow
Value
check
(1)
Refer to
36
No
page 7–12
37
No
S
Refer to
38
No
page 7–12
39
No
BA+A
40
No
S+A
Table
7–4, any Nios II instruction can be relocated by
Table 7–4
Table 7–4
Table 7–2 on page 7–2
Chapter 7: Application Binary Interface
Relocated Address
R
(2)
"Copy Relocation" on
"Jump Slot Relocation" on
Table 7–4
and
Table 7–4 on page
ABI for Linux Systems
Bit Mask
Bit Shift
M
B
n/a
n/a
0xFFFFFFFF
0
0xFFFFFFFF
0
0xFFFFFFFF
0
0xFFFFFFFF
0
7–8.
February 2014 Altera Corporation

Advertisement

Table of Contents
loading

Table of Contents