From: H.J. Lu Date: Wed, 19 Aug 2015 11:39:47 +0000 (-0700) Subject: Call __setcontext with HIDDEN_JUMPTARGET X-Git-Tag: glibc-2.23~632 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e58ab243de4a89c49eec1521970c2a05c9e4adc;p=thirdparty%2Fglibc.git Call __setcontext with HIDDEN_JUMPTARGET 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. --- diff --git a/ChangeLog b/ChangeLog index 5f9e4f7b0bc..592575b9322 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2015-08-19 H.J. Lu + + [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 * sysdeps/i386/i686/Makefile diff --git a/sysdeps/unix/sysv/linux/i386/makecontext.S b/sysdeps/unix/sysv/linux/i386/makecontext.S index bcf8de68ef2..fd1abf8c0d8 100644 --- a/sysdeps/unix/sysv/linux/i386/makecontext.S +++ b/sysdeps/unix/sysv/linux/i386/makecontext.S @@ -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). */ diff --git a/sysdeps/unix/sysv/linux/i386/setcontext.S b/sysdeps/unix/sysv/linux/i386/setcontext.S index 13609b0fb9e..75b4447647e 100644 --- a/sysdeps/unix/sysv/linux/i386/setcontext.S +++ b/sysdeps/unix/sysv/linux/i386/setcontext.S @@ -91,5 +91,6 @@ ENTRY(__setcontext) ret PSEUDO_END(__setcontext) +libc_hidden_def (__setcontext) weak_alias (__setcontext, setcontext)