about summary refs log tree commit diff
path: root/sysdeps/mach
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-05-30 01:24:09 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-05-30 01:24:09 +0200
commit3904414a3008751ffcaf18fbe33bd34812b7bfe5 (patch)
tree4ab82587af12337960116163bdb0207669a70cbf /sysdeps/mach
parentd6af2388f7085b134d289b034a9cbe21a2d5f819 (diff)
downloadglibc-3904414a3008751ffcaf18fbe33bd34812b7bfe5.tar.gz
glibc-3904414a3008751ffcaf18fbe33bd34812b7bfe5.tar.xz
glibc-3904414a3008751ffcaf18fbe33bd34812b7bfe5.zip
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.
Diffstat (limited to 'sysdeps/mach')
-rw-r--r--sysdeps/mach/hurd/i386/____longjmp_chk.S7
1 files changed, 6 insertions, 1 deletions
diff --git a/sysdeps/mach/hurd/i386/____longjmp_chk.S b/sysdeps/mach/hurd/i386/____longjmp_chk.S
index 4ddf6cd82e..dec8ea7778 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)