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:
parent
4b0e16bc72
commit
6a1dc51679
|
@ -107,13 +107,13 @@
|
||||||
ENTRY(setjmp)
|
ENTRY(setjmp)
|
||||||
__BIONIC_WEAK_ASM_FOR_NATIVE_BRIDGE(setjmp)
|
__BIONIC_WEAK_ASM_FOR_NATIVE_BRIDGE(setjmp)
|
||||||
li a1, 1
|
li a1, 1
|
||||||
tail PIC_PLT(sigsetjmp)
|
tail sigsetjmp
|
||||||
END(setjmp)
|
END(setjmp)
|
||||||
|
|
||||||
ENTRY(_setjmp)
|
ENTRY(_setjmp)
|
||||||
__BIONIC_WEAK_ASM_FOR_NATIVE_BRIDGE(_setjmp)
|
__BIONIC_WEAK_ASM_FOR_NATIVE_BRIDGE(_setjmp)
|
||||||
li a1, 0
|
li a1, 0
|
||||||
tail PIC_PLT(sigsetjmp)
|
tail sigsetjmp
|
||||||
END(_setjmp)
|
END(_setjmp)
|
||||||
|
|
||||||
// int sigsetjmp(sigjmp_buf env, int save_signal_mask);
|
// 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.
|
// Get the cookie and store it along with the signal flag.
|
||||||
mv a0, a1
|
mv a0, a1
|
||||||
call PIC_PLT(__bionic_setjmp_cookie_get)
|
call __bionic_setjmp_cookie_get
|
||||||
mv a1, a0
|
mv a1, a0
|
||||||
ld a0, 0(sp)
|
ld a0, 0(sp)
|
||||||
sd a1, _JB_SIGFLAG(a0)
|
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.
|
// The 'how'/a0 argument is ignored if set is NULL.
|
||||||
li a1, 0 // NULL
|
li a1, 0 // NULL
|
||||||
addi a2, a0, _JB_SIGMASK // old_mask.
|
addi a2, a0, _JB_SIGMASK // old_mask.
|
||||||
call PIC_PLT(sigprocmask)
|
call sigprocmask
|
||||||
|
|
||||||
1:
|
1:
|
||||||
// Restore original a0/ra.
|
// Restore original a0/ra.
|
||||||
|
@ -216,7 +216,7 @@ __BIONIC_WEAK_ASM_FOR_NATIVE_BRIDGE(siglongjmp)
|
||||||
li a0, 2 // SIG_SETMASK
|
li a0, 2 // SIG_SETMASK
|
||||||
addi a1, a2, _JB_SIGMASK // new_mask
|
addi a1, a2, _JB_SIGMASK // new_mask
|
||||||
li a2, 0 // NULL
|
li a2, 0 // NULL
|
||||||
call PIC_PLT(sigprocmask)
|
call sigprocmask
|
||||||
mv a1, t0 // Restore 'value'.
|
mv a1, t0 // Restore 'value'.
|
||||||
|
|
||||||
// Restore original a0 and ra.
|
// Restore original a0 and ra.
|
||||||
|
@ -250,7 +250,7 @@ __BIONIC_WEAK_ASM_FOR_NATIVE_BRIDGE(siglongjmp)
|
||||||
sd a0, 8(sp)
|
sd a0, 8(sp)
|
||||||
sd a1, 16(sp)
|
sd a1, 16(sp)
|
||||||
ld a0, _JB_SIGFLAG(a0)
|
ld a0, _JB_SIGFLAG(a0)
|
||||||
call PIC_PLT(__bionic_setjmp_cookie_check)
|
call __bionic_setjmp_cookie_check
|
||||||
ld ra, 0(sp)
|
ld ra, 0(sp)
|
||||||
ld a0, 8(sp)
|
ld a0, 8(sp)
|
||||||
ld a1, 16(sp)
|
ld a1, 16(sp)
|
||||||
|
@ -278,7 +278,7 @@ __BIONIC_WEAK_ASM_FOR_NATIVE_BRIDGE(siglongjmp)
|
||||||
ret
|
ret
|
||||||
|
|
||||||
3:
|
3:
|
||||||
call PIC_PLT(__bionic_setjmp_checksum_mismatch)
|
call __bionic_setjmp_checksum_mismatch
|
||||||
END(siglongjmp)
|
END(siglongjmp)
|
||||||
|
|
||||||
ALIAS_SYMBOL(longjmp, siglongjmp)
|
ALIAS_SYMBOL(longjmp, siglongjmp)
|
||||||
|
|
|
@ -37,8 +37,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define PIC_PLT(x) x@plt
|
|
||||||
|
|
||||||
#define __bionic_asm_align 16
|
#define __bionic_asm_align 16
|
||||||
|
|
||||||
#undef __bionic_asm_function_type
|
#undef __bionic_asm_function_type
|
||||||
|
|
Loading…
Reference in New Issue