From: Samuel Thibault Date: Sun, 29 May 2016 23:24:09 +0000 (+0200) Subject: hurd: fix _hurd_self_sigstate reference from ____longjmp_chk X-Git-Tag: glibc-2.24~174 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3904414a3008751ffcaf18fbe33bd34812b7bfe5;p=thirdparty%2Fglibc.git hurd: fix _hurd_self_sigstate reference from ____longjmp_chk * sysdeps/mach/hurd/i386/____longjmp_chk.S (____longjmp_chk) [PIC]: Use PLT entry for calling _hurd_self_sigstate. --- diff --git a/ChangeLog b/ChangeLog index 1e11464acc7..3eee1b286e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-05-30 Samuel Thibault + + * sysdeps/mach/hurd/i386/____longjmp_chk.S (____longjmp_chk) [PIC]: + Use PLT entry for calling _hurd_self_sigstate. + 2016-05-27 H.J. Lu * sysdeps/x86/cacheinfo.c (init_cacheinfo): Count number of diff --git a/sysdeps/mach/hurd/i386/____longjmp_chk.S b/sysdeps/mach/hurd/i386/____longjmp_chk.S index 4ddf6cd82e7..dec8ea77786 100644 --- a/sysdeps/mach/hurd/i386/____longjmp_chk.S +++ b/sysdeps/mach/hurd/i386/____longjmp_chk.S @@ -66,7 +66,12 @@ ENTRY (____longjmp_chk) /* TODO: need locking? */ /* struct hurd_sigstate * _hurd_self_sigstate (void) */ - call _hurd_self_sigstate +#ifdef PIC + call 1f +1: popl %ebx + addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ebx +#endif + call JUMPTARGET(_hurd_self_sigstate) /* TODO: %eax and %eax->sigaltstack are always valid? */ testl $SS_ONSTACK, (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)(%eax)