about summary refs log tree commit diff
path: root/linuxthreads/sysdeps/unix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-01-17 19:57:05 +0000
committerUlrich Drepper <drepper@redhat.com>2003-01-17 19:57:05 +0000
commit0f0b799489b3b4df2c69c9a6844be6a8f294778d (patch)
treeeb3e992ccc2b6635acfb7828bd8a00f4a69049ac /linuxthreads/sysdeps/unix
parentd1852dbb73b0ceb21cd132bb57ac2cee2364d786 (diff)
downloadglibc-0f0b799489b3b4df2c69c9a6844be6a8f294778d.tar.gz
glibc-0f0b799489b3b4df2c69c9a6844be6a8f294778d.tar.xz
glibc-0f0b799489b3b4df2c69c9a6844be6a8f294778d.zip
Update.
2003-01-17  Richard Henderson  <rth@redhat.com>

	* sysdeps/alpha/dl-machine.h (elf_machine_type_class): Add TLS
	relocs for class PLT.
	* sysdeps/alpha/libc-tls.c: New file.
	* sysdeps/unix/alpha/sysdep.S (EPILOGUE, GPSAVEREG): New.
	(LOADGP) [!PIC]: Rewrite to preserve caller's gp.

2003-01-17  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/ia64/dl-static.c (_dl_static_init): Use
	__libc_lock_{,un}lock_recursive instead of __libc_lock_{,un}lock
	on _dl_static_lock.
Diffstat (limited to 'linuxthreads/sysdeps/unix')
-rw-r--r--linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S27
1 files changed, 18 insertions, 9 deletions
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S b/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S
index 2481de9a12..e7507245e7 100644
--- a/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S
+++ b/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S
@@ -26,26 +26,35 @@ __LABEL(__vfork)
 	ldgp	gp, 0(pv)
 	.prologue 1
 	PSEUDO_PROF
+
 	SINGLE_THREAD_P(t0)
 #ifdef SHARED
 	bne	t0, HIDDEN_JUMPTARGET (__fork) !samegp
 #else
-	bne	t0, $hidden_fork
+	bne	t0, $do_fork
 #endif
+
 	lda	v0, SYS_ify(vfork)
 	call_pal PAL_callsys
-#ifdef SHARED
-	bne	a3, __syscall_error !samegp
-#else
-	bne	a3, $syscall_error
-#endif
+	bne	a3, SYSCALL_ERROR_LABEL
 	ret
+
 #ifndef SHARED
-$hidden_fork:
-	jmp	zero, HIDDEN_JUMPTARGET (__fork)
+	/* Can't tail-call due to possible mismatch between GP in
+	   fork and vfork object files.  */
+$do_fork:
+	subq	sp, 16, sp
+	stq	ra, 0(sp)
+	jsr	ra, HIDDEN_JUMPTARGET (__fork)
+	ldgp	gp, 0(ra)
+	ldq	ra, 0(sp)
+	addq	sp, 16, sp
+	ret
+
 $syscall_error:
-	jmp	zero, __syscall_error
+	SYSCALL_ERROR_HANDLER
 #endif
+
 PSEUDO_END(__vfork)
 libc_hidden_def (__vfork)