Skip to content

Commit feb836f

Browse files
Fix riscv64 trampoline to be compatible with PIC (#141)
1 parent 05083d5 commit feb836f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/trampolines/trampolines_riscv64.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
.p2align 2 SEP \
1010
MANGLE(UNDERSCORE(name))##: SEP \
1111
li t4, SYMBOL_IDX(idx) SEP \
12-
auipc t3, %pcrel_hi(NAMEADDR(name)) SEP \
13-
ld t3, %pcrel_lo(MANGLE(UNDERSCORE(name)))(t3) SEP \
12+
la t3, NAMEADDR(name) SEP \
13+
ld t3, 0(t3) SEP \
1414
jr t3 SEP \
1515
.cfi_endproc SEP \
1616

0 commit comments

Comments
 (0)