1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-03 12:11:17 +03:00

Use JUMPTARGET in x86-64 pthread

When PLT may be used, JUMPTARGET should be used instead calling the
function directly.

	* sysdeps/unix/sysv/linux/x86_64/cancellation.S
	(__pthread_enable_asynccancel): Use JUMPTARGET to call
	__pthread_unwind.
	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
	(__condvar_cleanup2): Use JUMPTARGET to call _Unwind_Resume.
	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
	(__condvar_cleanup1): Likewise.
This commit is contained in:
H.J. Lu
2016-03-21 06:38:17 -07:00
parent a4cea54b12
commit 893e371b2f
4 changed files with 13 additions and 7 deletions

View File

@@ -1,3 +1,13 @@
2016-03-21 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/unix/sysv/linux/x86_64/cancellation.S
(__pthread_enable_asynccancel): Use JUMPTARGET to call
__pthread_unwind.
* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
(__condvar_cleanup2): Use JUMPTARGET to call _Unwind_Resume.
* sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
(__condvar_cleanup1): Likewise.
2016-03-21 Dylan Alex Simon <dylan-sourceware@dylex.net> 2016-03-21 Dylan Alex Simon <dylan-sourceware@dylex.net>
[BZ #19822] [BZ #19822]

View File

@@ -76,11 +76,7 @@ ENTRY(__pthread_enable_asynccancel)
lock lock
orl $TCB_EXITING_BITMASK, %fs:CANCELHANDLING orl $TCB_EXITING_BITMASK, %fs:CANCELHANDLING
mov %fs:CLEANUP_JMP_BUF, %RDI_LP mov %fs:CLEANUP_JMP_BUF, %RDI_LP
#ifdef SHARED call JUMPTARGET(__pthread_unwind)
call __pthread_unwind@PLT
#else
call __pthread_unwind
#endif
hlt hlt
END(__pthread_enable_asynccancel) END(__pthread_enable_asynccancel)

View File

@@ -586,7 +586,7 @@ __condvar_cleanup2:
movq FRAME_SIZE+16(%rsp), %r13 movq FRAME_SIZE+16(%rsp), %r13
movq FRAME_SIZE+24(%rsp), %r12 movq FRAME_SIZE+24(%rsp), %r12
.LcallUR: .LcallUR:
call _Unwind_Resume@PLT call JUMPTARGET(_Unwind_Resume)
hlt hlt
.LENDCODE: .LENDCODE:
cfi_endproc cfi_endproc

View File

@@ -518,7 +518,7 @@ __condvar_cleanup1:
8: movq 24(%rsp), %rdi 8: movq 24(%rsp), %rdi
.LcallUR: .LcallUR:
call _Unwind_Resume@PLT call JUMPTARGET(_Unwind_Resume)
hlt hlt
.LENDCODE: .LENDCODE:
cfi_endproc cfi_endproc