Skip to content

Commit

Permalink
arch/riscv64: respect PIC in asm
Browse files Browse the repository at this point in the history
JIRA: RTOS-664
  • Loading branch information
badochov committed Oct 6, 2024
1 parent 9728942 commit 3a90120
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/riscv64/jmp.S
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,23 @@
.type _setjmp, %function
_setjmp:
mv a1, zero
#if __pic__ == 0
j sigsetjmp
#else
tail sigsetjmp
#endif
.size _setjmp, .-_setjmp


.globl setjmp
.type setjmp, %function
setjmp:
li a1, 1
#if __pic__ == 0
j sigsetjmp
#else
tail sigsetjmp
#endif
.size setjmp, .-setjmp


Expand Down
4 changes: 4 additions & 0 deletions arch/riscv64/syscalls.S
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ sym: \
.globl vfork;
.type vfork, %function;
vfork:
#if __pic__ == 0
j vforksvc
#else
tail vforksvc
#endif
.size vfork, .-vfork


Expand Down

0 comments on commit 3a90120

Please sign in to comment.