This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Misc glibc fixes


Hi!

1) ppc32 did not build because some 14 bit branch relocations had overflows
2) missing libc_hidden_def's
3) changes ia64 vfork to look almost like pt-vfork (with the exception that
   pt-vfork.S can rely on self->pid != 0)

2004-03-11  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
	(__novec_swapcontext): Branch to novec_* labels.
nptl/
	* sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
	libc_hidden_def.
	* sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
	Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
	* sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
	* sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
	of DO_CALL_VIA_BREAK.  Work around a gas problem.

--- libc/nptl/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S	2004-03-11 00:28:22.470292640 +0100
+++ libc/nptl/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S	2004-03-11 00:14:14.010159317 +0100
@@ -53,5 +53,5 @@ ENTRY (__vfork)
 	/* Normal return.  */
 	br	%r14
 PSEUDO_END(__vfork)
-
+libc_hidden_def (__vfork)
 weak_alias (__vfork, vfork)
--- libc/nptl/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S	2004-03-11 00:28:22.613267050 +0100
+++ libc/nptl/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S	2004-03-11 00:14:14.014158601 +0100
@@ -55,5 +55,5 @@ ENTRY (__vfork)
 	/* Normal return.  */
 	br	%r14
 PSEUDO_END(__vfork)
-
+libc_hidden_def (__vfork)
 weak_alias (__vfork, vfork)
--- libc/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S	2004-03-11 00:04:19.000000000 +0100
+++ libc/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S	2004-03-11 00:14:07.475329143 +0100
@@ -51,5 +51,5 @@ ENTRY (__vfork)
 	PSEUDO_RET
 
 PSEUDO_END (__vfork)
-
+libc_hidden_def (__vfork)
 weak_alias (__vfork, vfork)
--- libc/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S	2004-03-11 00:04:51.000000000 +0100
+++ libc/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S	2004-03-11 00:14:07.483327711 +0100
@@ -53,5 +53,5 @@ ENTRY (__vfork)
 	PSEUDO_RET
 
 PSEUDO_END (__vfork)
-
+libc_hidden_def (__vfork)
 weak_alias (__vfork, vfork)
diff: libc/nptl/sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: No such file or directory
--- libc/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S	2004-03-11 00:28:22.894216764 +0100
+++ libc/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S	2004-03-11 00:14:14.018157885 +0100
@@ -42,4 +42,5 @@ ENTRY(__vfork)
 	 nop
 
 PSEUDO_END (__vfork)
+libc_hidden_def (__vfork)
 weak_alias (__vfork, vfork)
--- libc/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S	2004-03-11 00:28:22.895216585 +0100
+++ libc/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S	2004-03-11 00:14:14.021157348 +0100
@@ -42,4 +42,5 @@ ENTRY(__vfork)
 	 nop
 
 PSEUDO_END (__vfork)
+libc_hidden_def (__vfork)
 weak_alias (__vfork, vfork)
--- libc/nptl/sysdeps/unix/sysv/linux/ia64/vfork.S	2004-03-11 00:28:22.153349368 +0100
+++ libc/nptl/sysdeps/unix/sysv/linux/ia64/vfork.S	2004-03-11 00:14:14.025156632 +0100
@@ -31,6 +31,8 @@
 /* Implemented as __clone_syscall(CLONE_VFORK | CLONE_VM | SIGCHLD, 0)	*/
 
 ENTRY(__vfork)
+	.prologue	// work around a GAS bug which triggers if
+	.body		// first .prologue is not at the beginning of proc.
 	alloc r2=ar.pfs,0,0,2,0
 	adds r14=PID,r13
 	;;
@@ -44,7 +46,7 @@ ENTRY(__vfork)
 	mov out1=0		/* Standard sp value.			*/
 	;;
 	st4 [r14]=r15
-	DO_CALL_VIA_BREAK (SYS_ify (clone))
+	DO_CALL (SYS_ify (clone))
 	cmp.eq p6,p0=0,r8
 	adds r14=PID,r13
 (p6)	br.cond.dptk 1f
@@ -64,5 +66,4 @@ ENTRY(__vfork)
 	ret
 PSEUDO_END(__vfork)
 libc_hidden_def (__vfork)
-
 weak_alias (__vfork, vfork)
--- libc/nptl/sysdeps/unix/sysv/linux/ia64/pt-vfork.S	2004-03-11 00:28:22.152349547 +0100
+++ libc/nptl/sysdeps/unix/sysv/linux/ia64/pt-vfork.S	2004-03-11 00:14:14.029155916 +0100
@@ -20,6 +20,7 @@
 #include <sysdep.h>
 #define _SIGNAL_H
 #include <bits/signum.h>
+#include <tcb-offsets.h>
 
 /* The following are defined in linux/sched.h, which unfortunately	*/
 /* is not safe for inclusion in an assembly file.			*/
@@ -34,7 +35,7 @@ ENTRY(__vfork)
 	.body		// first .prologue is not at the beginning of proc.
 	alloc r2=ar.pfs,0,0,2,0
 	adds r14=PID,r13
-	;; 
+	;;
 	ld4 r16=[r14]
 	;;
 	sub r15=0,r16
--- libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S	2004-03-11 00:23:04.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S	2004-03-11 00:24:08.609729494 +0100
@@ -573,7 +573,7 @@ ENTRY(__novec_swapcontext)
 	li	r3,SIG_SETMASK
 	bl	JUMPTARGET(sigprocmask)
 	cmpwi	r3,0
-	bne	L(error_exit)
+	bne	L(novec_error_exit)
 
 	/*
 	 * If the new ucontext refers to the point where we were interrupted
@@ -590,7 +590,7 @@ ENTRY(__novec_swapcontext)
 	lwz	r31,_UC_REGS_PTR(r31)
 	lwz	r0,_UC_GREGS+(PT_MSR*4)(r31)
 	cmpwi	r0,0
-	bne	L(do_sigret)
+	bne	L(novec_do_sigret)
 
 	/* Restore the floating-point registers */
 	lfd	fp31,_UC_FREGS+(32*8)(r31)

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]