![Intel NIOS II Owner Reference Manual Download Page 157](http://html1.mh-extra.com/html/intel/nios-ii/nios-ii_owner-reference-manual_2071826157.webp)
With the information in the table above, any Nios II instruction can be relocated by
manipulating it as an unsigned 32-bit integer, as follows:
Xr = (( R << B ) & M | ( X & ~M ));
where:
•
R is the relocated address, calculated in the above table
•
B is the bit shift
•
M is the bit mask
•
X is the original instruction
•
Xr is the relocated instruction
Related Information
•
Jump Slot Relocation
on page 159
•
Copy Relocation
on page 158
•
Thread-Local Storage
on page 159
7.9. ABI for Linux Systems
This section describes details specific to Linux systems beyond the Linux-specific
information in Nios II ABI Register Usage Table and the Nios II Relocation Calculation
Table.
Related Information
•
Relocation
on page 154
•
Register Usage
on page 147
7.9.1. Linux Toolchain Relocation Information
Dynamic relocations can appear in the runtime relocation sections of executables and
shared objects, but never appear in object files (with the exception of
R_NIOS2_TLS_DTPREL, which is used for debug information). No other relocations are
dynamic.
Table 86.
Dynamic Relocations
R_NIOS2_TLS_DTPMOD
R_NIOS2_TLS_DTPREL
R_NIOS2_TLS_TPREL
R_NIOS2_COPY
R_NIOS2_GLOB_DAT
R_NIOS2_JUMP_SLOT
R_NIOS2_RELATIVE
7. Application Binary Interface
NII-PRG | 2018.04.18
Nios II Processor Reference Guide
157