]> sourceware.org Git - glibc.git/commitdiff
Use JUMPTARGET in x86-64 pthread
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 21 Mar 2016 13:38:17 +0000 (06:38 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 21 Mar 2016 13:51:05 +0000 (06:51 -0700)
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.

ChangeLog
sysdeps/unix/sysv/linux/x86_64/cancellation.S
sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S

index 17c9dc054cb8c8e1286933ac90777e026890af16..f662d9aef7fdcae0db0dac8aa88b1c1096ed9c23 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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]
index 687057dba3f7e05e73f2a6d67a8896b7f014a949..04a0e59ea89ef7c5445cbd6408a39e04a5fdddf3 100644 (file)
@@ -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)
 
index 9a63314b6e536068b326e283642f67c25530f6e8..a2adc09b27ec255ae65fc9d4ad70734de3423ddb 100644 (file)
@@ -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
index ed93d5d29c88af1c7bacc9b7c860a40c596bb7f1..c4d3504a6722b0333656bfeb7beab406c93203b0 100644 (file)
@@ -518,7 +518,7 @@ __condvar_cleanup1:
 
 8:     movq    24(%rsp), %rdi
 .LcallUR:
-       call    _Unwind_Resume@PLT
+       call    JUMPTARGET(_Unwind_Resume)
        hlt
 .LENDCODE:
        cfi_endproc
This page took 0.205936 seconds and 5 git commands to generate.