riscv64: don't go via the PLT for setjmp.

I don't think we need or want to do this. Most other architectures
don't.

Test: bionic-unit-tests-static
Change-Id: I3ad31926909caf0a37e73ac6cbac1fecd02ea6de
This commit is contained in:
Elliott Hughes 2022-10-26 19:53:35 +00:00
parent 4b0e16bc72
commit 6a1dc51679
2 changed files with 7 additions and 9 deletions

View File

@ -107,13 +107,13 @@
ENTRY(setjmp)
__BIONIC_WEAK_ASM_FOR_NATIVE_BRIDGE(setjmp)
li a1, 1
tail PIC_PLT(sigsetjmp)
tail sigsetjmp
END(setjmp)
ENTRY(_setjmp)
__BIONIC_WEAK_ASM_FOR_NATIVE_BRIDGE(_setjmp)
li a1, 0
tail PIC_PLT(sigsetjmp)
tail sigsetjmp
END(_setjmp)
// int sigsetjmp(sigjmp_buf env, int save_signal_mask);
@ -126,7 +126,7 @@ __BIONIC_WEAK_ASM_FOR_NATIVE_BRIDGE(sigsetjmp)
// Get the cookie and store it along with the signal flag.
mv a0, a1
call PIC_PLT(__bionic_setjmp_cookie_get)
call __bionic_setjmp_cookie_get
mv a1, a0
ld a0, 0(sp)
sd a1, _JB_SIGFLAG(a0)
@ -139,7 +139,7 @@ __BIONIC_WEAK_ASM_FOR_NATIVE_BRIDGE(sigsetjmp)
// The 'how'/a0 argument is ignored if set is NULL.
li a1, 0 // NULL
addi a2, a0, _JB_SIGMASK // old_mask.
call PIC_PLT(sigprocmask)
call sigprocmask
1:
// Restore original a0/ra.
@ -216,7 +216,7 @@ __BIONIC_WEAK_ASM_FOR_NATIVE_BRIDGE(siglongjmp)
li a0, 2 // SIG_SETMASK
addi a1, a2, _JB_SIGMASK // new_mask
li a2, 0 // NULL
call PIC_PLT(sigprocmask)
call sigprocmask
mv a1, t0 // Restore 'value'.
// Restore original a0 and ra.
@ -250,7 +250,7 @@ __BIONIC_WEAK_ASM_FOR_NATIVE_BRIDGE(siglongjmp)
sd a0, 8(sp)
sd a1, 16(sp)
ld a0, _JB_SIGFLAG(a0)
call PIC_PLT(__bionic_setjmp_cookie_check)
call __bionic_setjmp_cookie_check
ld ra, 0(sp)
ld a0, 8(sp)
ld a1, 16(sp)
@ -278,7 +278,7 @@ __BIONIC_WEAK_ASM_FOR_NATIVE_BRIDGE(siglongjmp)
ret
3:
call PIC_PLT(__bionic_setjmp_checksum_mismatch)
call __bionic_setjmp_checksum_mismatch
END(siglongjmp)
ALIAS_SYMBOL(longjmp, siglongjmp)

View File

@ -37,8 +37,6 @@
#pragma once
#define PIC_PLT(x) x@plt
#define __bionic_asm_align 16
#undef __bionic_asm_function_type