Intel NIOS II Owner Reference Manual page 158

Table of Contents

Advertisement

A global offset table (GOT) entry referenced using R_NIOS2_GOT16,
R_NIOS2_GOT_LO and/or R_NIOS2_GOT_HA must be resolved at load time. A GOT
entry referenced only using R_NIOS2_CALL16, R_NIOS2_CALL_LO and/or
R_NIOS2_CALL_HA can initially refer to a procedure linkage table (PLT) entry and then
be resolved lazily.
Because the TP-relative relocations are 16-bit relocations, no dynamic object using
local dynamic or local executable thread-local storage (TLS) can have more than
64 KB of TLS data. New relocations might be added to support this in the future.
Several new assembler operators are defined to generate the Linux-specific
relocations, as listed in the table below.
Table 87.
Relocation and Operator
R_NIOS2_GOT16
R_NIOS2_CALL16
R_NIOS2_GOTOFF_LO
R_NIOS2_GOTOFF_HA
R_NIOS2_PCREL_LO
R_NIOS2_PCREL_HA
R_NIOS2_TLS_GD16
R_NIOS2_TLS_LDM16
R_NIOS2_TLS_LDO16
R_NIOS2_TLS_IE16
R_NIOS2_TLS_LE16
R_NIOS2_TLS_DTPREL
R_NIOS2_GOTOFF
R_NIOS2_GOT_LO
R_NIOS2_GOT_HA
R_NIOS2_CALL_LO
R_NIOS2_CALL_HA
The %
hiadj
depending whether the expression being relocated is PC-relative. For
instance, %
generates R_NIOS2_TLS_LDO16 when used as an immediate operand, and
R_NIOS2_TLS_DTPREL when used with the
7.9.1.1. Copy Relocation
The R_NIOS2_COPY relocation is used to mark variables allocated in the executable
that are defined in a shared library. The variable's initial value is copied from the
shared library to the relocated location.
Nios II Processor Reference Guide
158
Relocation
and %
operators generate PC-relative or non-PC-relative relocations,
lo
hiadj(_gp_got - .)
Operator
%got
%call
%gotoff_hiadj
%gotoff_lo
%hiadj
%lo
%tls_gd
%tls_ldm
%tls_ldo
%tls_ie
%tls_le
%tls_ldo
%gotoff
%got_lo
%got_hiadj
%call_lo
%call_hiadj
generates R_NIOS2_PCREL_HA. %
directive.
.word
7. Application Binary Interface
NII-PRG | 2018.04.18
tls_ldo

Advertisement

Table of Contents
loading

Table of Contents