diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2016-03-21 06:38:17 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2016-03-21 06:51:05 -0700 |
commit | 893e371b2f27f7fd6f503cefce8d9f754aaefd58 (patch) | |
tree | 0588b74ad5857e25dcfa738562444c8909072c5b | |
parent | a4cea54b12ff33e81be4413abb74905020890330 (diff) | |
download | glibc-893e371b2f27f7fd6f503cefce8d9f754aaefd58.zip glibc-893e371b2f27f7fd6f503cefce8d9f754aaefd58.tar.gz glibc-893e371b2f27f7fd6f503cefce8d9f754aaefd58.tar.bz2 |
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.
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/cancellation.S | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S | 2 |
4 files changed, 13 insertions, 7 deletions
@@ -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> [BZ #19822] diff --git a/sysdeps/unix/sysv/linux/x86_64/cancellation.S b/sysdeps/unix/sysv/linux/x86_64/cancellation.S index 687057d..04a0e59 100644 --- a/sysdeps/unix/sysv/linux/x86_64/cancellation.S +++ b/sysdeps/unix/sysv/linux/x86_64/cancellation.S @@ -76,11 +76,7 @@ ENTRY(__pthread_enable_asynccancel) lock orl $TCB_EXITING_BITMASK, %fs:CANCELHANDLING mov %fs:CLEANUP_JMP_BUF, %RDI_LP -#ifdef SHARED - call __pthread_unwind@PLT -#else - call __pthread_unwind -#endif + call JUMPTARGET(__pthread_unwind) hlt END(__pthread_enable_asynccancel) diff --git a/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S b/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S index 9a63314..a2adc09 100644 --- a/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +++ b/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S @@ -586,7 +586,7 @@ __condvar_cleanup2: movq FRAME_SIZE+16(%rsp), %r13 movq FRAME_SIZE+24(%rsp), %r12 .LcallUR: - call _Unwind_Resume@PLT + call JUMPTARGET(_Unwind_Resume) hlt .LENDCODE: cfi_endproc diff --git a/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S index ed93d5d..c4d3504 100644 --- a/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S +++ b/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S @@ -518,7 +518,7 @@ __condvar_cleanup1: 8: movq 24(%rsp), %rdi .LcallUR: - call _Unwind_Resume@PLT + call JUMPTARGET(_Unwind_Resume) hlt .LENDCODE: cfi_endproc |