Skip to content

Commit

Permalink
sparc: make asm PIC friendly
Browse files Browse the repository at this point in the history
JIRA: RTOS-664
  • Loading branch information
badochov committed Oct 6, 2024
1 parent 3a90120 commit 47a6b37
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
13 changes: 12 additions & 1 deletion arch/sparcv8leon3/jmp.S
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,19 @@ _longjmp:
.type sigsetjmp, #function
sigsetjmp:
cmp %o1, 0
bne setjmp
bne 1f
nop
#if __pic__ == 0
ba _setjmp
#else
jmp _setjmp
#endif
nop
1:
#if __pic__ == 0
ba setjmp
#else
jmp setjmp
#endif
nop
.size sigsetjmp, .-sigsetjmp
4 changes: 4 additions & 0 deletions arch/sparcv8leon3/syscalls.S
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ sym: \
.globl vfork
.type vfork, #function
vfork:
#if __pic__ == 0
ba vforksvc
#else
jmp vforksvc
#endif
nop
.size vfork, .-vfork

Expand Down

0 comments on commit 47a6b37

Please sign in to comment.