POWER sys/procfs.h mismatch with kernel 2.6.15

Andreas Jaeger aj@suse.de
Fri Jan 13 07:45:00 GMT 2006


Paul Mackerras <paulus@samba.org> writes:

> Thorsten Kukuk writes:
>
>> kernel 2.6.15 has in asm-power/elf.h (line 110):
>> 
>> # define ELF_NVRREG     34      /* includes vscr & vrsave in split vectors */
>> 
>> 
>> But sysdeps/unix/sysv/linux/powerpc/sys/procfs.h has:
>> 
>> #define ELF_NVRREG      33      /* includes vscr */
>> 
>> 
>> Can somebody of the POWER developers please check what the correct
>> value is and fix that?
>
> It's 34 for 64-bit processes, but 33 for 32-bit processes.  The kernel
> include/asm-powerpc/elf.h file is correct.
>
> Paul.

I propose the appended patch.  

Ok to commit?

Andreas

2006-01-13  Andreas Jaeger  <aj@suse.de>

	* sysdeps/unix/sysv/linux/powerpc/sys/procfs.h (ELF_NVRREG): Fix
         value for PowerPC64.

============================================================
Index: sysdeps/unix/sysv/linux/powerpc/sys/procfs.h
--- sysdeps/unix/sysv/linux/powerpc/sys/procfs.h	2 Mar 2005 20:11:38 -0000	1.12
+++ sysdeps/unix/sysv/linux/powerpc/sys/procfs.h	13 Jan 2006 07:44:25 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1999, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999, 2002, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -38,7 +38,11 @@ __BEGIN_DECLS
 #ifndef __PPC64_ELF_H
 #define ELF_NGREG       48      /* includes nip, msr, lr, etc. */
 #define ELF_NFPREG      33      /* includes fpscr */
-#define ELF_NVRREG      33      /* includes vscr */
+#if __WORDSIZE == 32
+# define ELF_NVRREG      33      /* includes vscr */
+#else
+# define ELF_NVRREG      34      /* includes vscr */
+#endif
 
 typedef unsigned long elf_greg_t;
 typedef elf_greg_t elf_gregset_t[ELF_NGREG];

-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20060113/b0fd7767/attachment.sig>


More information about the Libc-alpha mailing list