[parisc-linux-cvs] glibc amodra

Alan Modra alan@linuxcare.com.au
Thu, 1 Mar 2001 14:44:39 +1100 (EST)


On Wed, 28 Feb 2001, Alan Modra wrote:

> Update gregset for new kernel.
> Update build for new tools.

	* Makerules (libc_pic.os): Add $(LDFLAGS-os).
	* sysdeps/hppa/Makefile (LDFLAGS-os): Define.
	(CFLAGS-.os): Remove.

	* sysdeps/unix/sysv/linux/hppa/sysdep.h (CALL_MCOUNT): Update
	comment.

	* sysdeps/unix/sysv/linux/hppa/sys/ucontext.h (NGREG, NFPREG,
	gregset): Correct for new kernel definitions.

Alan Modra
-- 
Linuxcare.  Support for the Revolution.

Index: Makerules
===================================================================
RCS file: /home/cvs/parisc/glibc/Makerules,v
retrieving revision 1.4
diff -u -p -r1.4 Makerules
--- Makerules	2001/01/16 05:22:03	1.4
+++ Makerules	2001/03/01 03:25:11
@@ -454,7 +454,7 @@ LDFLAGS-c.so += -u __register_frame
 # between libc.so and ld.so, which can make it impossible to upgrade.
 $(common-objpfx)libc_pic.os: $(common-objpfx)libc_pic.a
 	$(LINK.o) -nostdlib -nostartfiles -r -o $@ \
-	-Wl,-d -Wl,--whole-archive $^
+	$(LDFLAGS-os) -Wl,-d -Wl,--whole-archive $^
 # Use our own special initializer and finalizer files for libc.so.
 $(common-objpfx)libc.so: $(elfobjdir)/soinit.os \
 			 $(common-objpfx)libc_pic.os \
Index: sysdeps/hppa/Makefile
===================================================================
RCS file: /home/cvs/parisc/glibc/sysdeps/hppa/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- Makefile	2000/08/15 02:36:00	1.2
+++ Makefile	2001/03/01 03:25:11
@@ -17,8 +17,10 @@
 # write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
-# We need this for all shared objects since the build process uses ld -r
-CFLAGS-.os += -ffunction-sections
+# We used to need this since the build process uses ld -r.  Now we use
+# ld -r --unique=.text* which does more or less the same thing, but better.
+# CFLAGS-.os += -ffunction-sections
+LDFLAGS-os += -Wl,--unique=.text*
 
 ifeq ($(subdir),elf)
 dl-routines += dl-symaddr dl-fptr
Index: sysdeps/unix/sysv/linux/hppa/sysdep.h
===================================================================
RCS file: /home/cvs/parisc/glibc/sysdeps/unix/sysv/linux/hppa/sysdep.h,v
retrieving revision 1.9
diff -u -p -r1.9 sysdep.h
--- sysdep.h	2000/10/02 23:12:24	1.9
+++ sysdep.h	2001/03/01 03:25:11
@@ -89,13 +89,8 @@
 1:	.size	C_SYMBOL_NAME(name),1b-C_SYMBOL_NAME(name)
 
 /* If compiled for profiling, call `mcount' at the start of each function.  */
-#ifdef	PROF
-/* The mcount code relies on a normal frame pointer being on the stack
-   to locate our caller, so push one just for its benefit.  */
-#define CALL_MCOUNT		/* XXX */
-#else
+/* No, don't bother.  gcc will put the call in for us.  */
 #define CALL_MCOUNT		/* Do nothing.  */
-#endif
 
 /* syscall wrappers consist of
 	#include <sysdep.h>
Index: sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
===================================================================
RCS file: /home/cvs/parisc/glibc/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h,v
retrieving revision 1.2
diff -u -p -r1.2 ucontext.h
--- ucontext.h	2000/11/17 02:06:35	1.2
+++ ucontext.h	2001/03/01 03:25:11
@@ -33,15 +33,16 @@
 typedef unsigned long int greg_t;
 
 /* Number of general registers.  */
-#define NGREG	42
-#define NFPREG	33
+#define NGREG	80
+#define NFPREG	32
 
 /* Container for all general registers.  */
 typedef struct gregset
   {
     greg_t g_regs[32];
-    greg_t sr_regs[5];
-    greg_t g_pad[5];
+    greg_t sr_regs[8];
+    greg_t cr_regs[24];
+    greg_t g_pad[16];
   } gregset_t;
 
 /* Container for all FPU registers.  */