include/elf/
authorUlrich Weigand <uweigand@de.ibm.com>
Fri, 18 Dec 2009 16:21:51 +0000 (16:21 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Fri, 18 Dec 2009 16:21:51 +0000 (16:21 +0000)
* common.h (NT_S390_HIGH_GPRS): Define.

bfd/
* elf.c (elfcore_grok_s390_high_gprs): New function.
(elfcore_grok_note): Handle NT_S390_HIGH_GPRS notes.
(elfcore_write_s390_high_gprs): New function.
(elfcore_write_register_note): Call it.

binutils/
* readelf.c (get_note_type): Handle NT_S390_HIGH_GPRS notes.

bfd/ChangeLog
bfd/elf.c
binutils/ChangeLog
binutils/readelf.c
include/elf/ChangeLog
include/elf/common.h

index 1c4412a1da643dd662e73a62269845f4030d1a5c..036cc9fc7c428786769f8490008dbbc3dcb884c8 100644 (file)
@@ -1,3 +1,10 @@
+2009-12-18  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * elf.c (elfcore_grok_s390_high_gprs): New function.
+       (elfcore_grok_note): Handle NT_S390_HIGH_GPRS notes.
+       (elfcore_write_s390_high_gprs): New function.
+       (elfcore_write_register_note): Call it.
+
 2009-12-17  Alan Modra  <amodra@bigpond.net.au>
 
        PR ld/11088
index 8378481bf448db6f82244d158f869bb6c1ebbcf7..3287d0f8fa3b5202cfcadca303e7d22cb6dcc179 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -7638,6 +7638,12 @@ elfcore_grok_ppc_vsx (bfd *abfd, Elf_Internal_Note *note)
   return elfcore_make_note_pseudosection (abfd, ".reg-ppc-vsx", note);
 }
 
+static bfd_boolean
+elfcore_grok_s390_high_gprs (bfd *abfd, Elf_Internal_Note *note)
+{
+  return elfcore_make_note_pseudosection (abfd, ".reg-s390-high-gprs", note);
+}
+
 #if defined (HAVE_PRPSINFO_T)
 typedef prpsinfo_t   elfcore_psinfo_t;
 #if defined (HAVE_PRPSINFO32_T)                /* Sparc64 cross Sparc32 */
@@ -7999,6 +8005,13 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
       else
         return TRUE;
 
+    case NT_S390_HIGH_GPRS:
+      if (note->namesz == 6
+          && strcmp (note->namedata, "LINUX") == 0)
+        return elfcore_grok_s390_high_gprs (abfd, note);
+      else
+        return TRUE;
+
     case NT_PRPSINFO:
     case NT_PSINFO:
       if (bed->elf_backend_grok_psinfo)
@@ -8641,6 +8654,19 @@ elfcore_write_ppc_vsx (bfd *abfd,
                              note_name, NT_PPC_VSX, ppc_vsx, size);
 }
 
+static char *
+elfcore_write_s390_high_gprs (bfd *abfd,
+                             char *buf,
+                             int *bufsiz,
+                             const void *s390_high_gprs,
+                             int size)
+{
+  char *note_name = "LINUX";
+  return elfcore_write_note (abfd, buf, bufsiz,
+                             note_name, NT_S390_HIGH_GPRS,
+                            s390_high_gprs, size);
+}
+
 char *
 elfcore_write_register_note (bfd *abfd,
                             char *buf,
@@ -8657,6 +8683,8 @@ elfcore_write_register_note (bfd *abfd,
     return elfcore_write_ppc_vmx (abfd, buf, bufsiz, data, size);
   if (strcmp (section, ".reg-ppc-vsx") == 0)
     return elfcore_write_ppc_vsx (abfd, buf, bufsiz, data, size);
+  if (strcmp (section, ".reg-s390-high-gprs") == 0)
+    return elfcore_write_s390_high_gprs (abfd, buf, bufsiz, data, size);
   return NULL;
 }
 
index 9ed437602e7c13860a42d827f20792c7bbb74a89..4098d9e63e7407f8e706be409c40be58d9fafa32 100644 (file)
@@ -1,3 +1,7 @@
+2009-12-18  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * readelf.c (get_note_type): Handle NT_S390_HIGH_GPRS notes.
+
 2009-12-11  Nick Clifton  <nickc@redhat.com>
 
        * Makefile.in: Regenerate.
index 689cd8acc5e8741801fd31eaf03657b1351a1c8b..956144dfb3a39531cc2d98daf790e9ca24ee11db 100644 (file)
@@ -10385,6 +10385,8 @@ get_note_type (unsigned e_type)
        return _("NT_PPC_VMX (ppc Altivec registers)");
       case NT_PPC_VSX:
        return _("NT_PPC_VSX (ppc VSX registers)");
+      case NT_S390_HIGH_GPRS:
+       return _("NT_S390_HIGH_GPRS (s390 upper register halves)");
       case NT_PSTATUS:
        return _("NT_PSTATUS (pstatus structure)");
       case NT_FPREGS:
index 2befe57207bec96a2c4bae0e5077ba4f89b585de..127f765ac46439f6ea3eb37162c93818240f1fe0 100644 (file)
@@ -1,3 +1,7 @@
+2009-12-18  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * common.h (NT_S390_HIGH_GPRS): Define.
+
 2009-12-17  Alan Modra  <amodra@bigpond.net.au>
 
        * ppc.h (R_PPC_RELAX32, R_PPC_RELAX32PC, R_PPC_RELAX32_PLT,
index ff6aed222c7cf706c28c3bc0add31f16a727a9ec..361703de335da731b86140ff0e6134f277eb10f2 100644 (file)
                                        /*   note name must be "LINUX".  */
 #define NT_PPC_VSX     0x102           /* PowerPC VSX registers */
                                        /*   note name must be "LINUX".  */
+#define NT_S390_HIGH_GPRS 0x300                /* S/390 upper halves of GPRs  */
+                                       /*   note name must be "LINUX".  */
 
 /* Note segments for core files on dir-style procfs systems.  */
 
This page took 0.038707 seconds and 4 git commands to generate.