Skip to content

Commit ad21ffd

Browse files
committed
Add note ensuring to emit relocations in the presence of relaxation
1 parent 6406f58 commit ad21ffd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

riscv-elf.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,11 @@ rather than to instruct the linker how to apply a relocation.
999999
The linker should only perform such relaxations when a R_RISCV_RELAX relocation
10001000
is at the same position as a candidate relocation.
10011001

1002+
As this transformation may delete bytes (and thus invalidate references that
1003+
are commonly resolved at compile-time, such as intra-function jumps), code
1004+
generators must in general ensure that relocations are always emitted when
1005+
relaxation is enabled.
1006+
10021007
[bibliography]
10031008
== References
10041009

0 commit comments

Comments
 (0)