You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clarify that multiple R_RISCV_LO12_I/R_RISCV_LO12_S can share one single R_RISCV_HI20
This is most common on rv32 when loading a 8-byte aligned global
variable, e.g.
```
double NaturallyAlignedScalar = 5.;
double accessNaturallyAlignedScalar() { return NaturallyAlignedScalar; }
// lui a1, %hi(NaturallyAlignedScalar)
// lw a0, %lo(NaturallyAlignedScalar)(a1)
// lw a1, %lo(NaturallyAlignedScalar+4)(a1)
double NaturallyAlignedArray[4] = { 3., 4., 5., 6. };
double accessNaturallyAlignedArray() {
return NaturallyAlignedArray[0] + NaturallyAlignedArray[3];
}
// lui a2, %hi(NaturallyAlignedArray)
// lw a0, %lo(NaturallyAlignedArray)(a2)
// lw a1, %lo(NaturallyAlignedArray+4)(a2)
// addi a3, a2, %lo(NaturallyAlignedArray)
// lw a2, 24(a3)
// lw a3, 28(a3)
```
The HI20 values for the multiple fragments must be identical and all the
relaxed global-pointer offsets must be in range.
0 commit comments