Skip to content

Commit 8ec323b

Browse files
bors[bot]laanwj
andauthored
Merge #57
57: Surround use of absolute address with "norelax" r=Disasm a=laanwj This prevents an unsupported `R_RISCV_ALIGN` relocation from being generated by disabling link-time relaxing for the appropriate part. Fixes #55. Co-authored-by: Wladimir J. van der Laan <[email protected]>
2 parents 158d964 + ced1ad4 commit 8ec323b

9 files changed

+3
-0
lines changed

riscv-rt/asm.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,16 @@ _start:
3030

3131
// for 64bit
3232
.if __riscv_xlen == 64
33+
.option push
34+
.option norelax // to prevent an unsupported R_RISCV_ALIGN relocation from being generated
3335
1:
3436
auipc ra, %pcrel_hi(1f)
3537
ld ra, %pcrel_lo(1b)(ra)
3638
jr ra
3739
.align 3
3840
1:
3941
.dword _abs_start
42+
.option pop
4043
.endif
4144

4245
_abs_start:
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-72 Bytes
Binary file not shown.
-72 Bytes
Binary file not shown.
-72 Bytes
Binary file not shown.
-72 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)