]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Call __setcontext with HIDDEN_JUMPTARGET
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 19 Aug 2015 11:39:47 +0000 (04:39 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 19 Aug 2015 11:41:01 +0000 (04:41 -0700)
i386 __makecontext should call __setcontext with HIDDEN_JUMPTARGET.

[BZ #18822]
* sysdeps/unix/sysv/linux/i386/makecontext.S (__makecontext):
Don't load %ebx when calling __setcontext.  Call __setcontext
with HIDDEN_JUMPTARGET.
* sysdeps/unix/sysv/linux/i386/setcontext.S (__setcontext): Add
libc_hidden_def.

ChangeLog
sysdeps/unix/sysv/linux/i386/makecontext.S
sysdeps/unix/sysv/linux/i386/setcontext.S

index 5f9e4f7b0bc62b10c2243ae02ebb9dadd2e04a8d..592575b9322b83e6438e739b3666544914fd9bc5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-08-19  H.J. Lu  <hongjiu.lu@intel.com>
+
+       [BZ #18822]
+       * sysdeps/unix/sysv/linux/i386/makecontext.S (__makecontext):
+       Don't load %ebx when calling __setcontext.  Call __setcontext
+       with HIDDEN_JUMPTARGET.
+       * sysdeps/unix/sysv/linux/i386/setcontext.S (__setcontext): Add
+       libc_hidden_def.
+
 2015-08-19  H.J. Lu  <hongjiu.lu@intel.com>
 
        * sysdeps/i386/i686/Makefile
index bcf8de68ef2e3e9787939cd28e2046a2c824e8c7..fd1abf8c0d80f70690d85535b88bc0938b43721e 100644 (file)
@@ -102,15 +102,10 @@ L(exitcode):
           parameters (see above).  */
        leal    (%esp,%ebx,4), %esp
 
-#ifdef PIC
-       call    1f
-1:     popl    %ebx
-       addl    $_GLOBAL_OFFSET_TABLE_+[.-1b], %ebx
-#endif
        cmpl    $0, (%esp)              /* Check the next context.  */
        je      2f                      /* If it is zero exit.  */
 
-       call    JUMPTARGET(__setcontext)
+       call    HIDDEN_JUMPTARGET(__setcontext)
        /* If this returns (which can happen if the syscall fails) we'll
           exit the program with the return error value (-1).  */
 
index 13609b0fb9e37d02a7e0c6542c5ac5fed47a902c..75b4447647ea8459be7be505643dd187360885e5 100644 (file)
@@ -91,5 +91,6 @@ ENTRY(__setcontext)
 
        ret
 PSEUDO_END(__setcontext)
+libc_hidden_def (__setcontext)
 
 weak_alias (__setcontext, setcontext)