Skip to content

Commit

Permalink
Revise 'Landing Pad Scheme Relaxation'
Browse files Browse the repository at this point in the history
- Drop the restriction of static link
- Emphasis must be applied to all `R_RISCV_LPAD`
- GNU property and PLT entries must adjust too.
  • Loading branch information
kito-cheng committed Oct 18, 2024
1 parent 1e21e42 commit 5d43b57
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion riscv-elf.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2379,11 +2379,14 @@ Can be relaxed into `nop` if no `R_RISCV_RELAX` is paired with `R_RISCV_LPAD`.

Condition:: This relaxation can be performed without `R_RISCV_RELAX`, and
should not be enabled by default. The user must explicitly enable this
relaxation, and it should only be applied during static linking.
relaxation. Additionally, if this relaxation is applied, it must be applied
consistently to all `R_RISCV_LPAD` relocations in the entire binary.

Relaxation::
- Lpad instruction associated with `R_RISCV_LPAD` will be replaced with
`lpad 0`.
- The GNU property must be adjusted to reflect the use of this relaxation.
- The format of the PLT entries must also be adjusted accordingly.

Example::
+
Expand Down

0 comments on commit 5d43b57

Please sign in to comment.