Blame SOURCES/gdb-rhbz1187581-power8-regs-not-in-8.2-02of15.patch

ce65b8
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
ce65b8
From: Keith Seitz <keiths@redhat.com>
ce65b8
Date: Fri, 11 Jan 2019 17:02:12 -0500
ce65b8
Subject: gdb-rhbz1187581-power8-regs-not-in-8.2-02of15.patch
ce65b8
ce65b8
;; Add grok/write functions for new ppc core note sections
ce65b8
;; Edjunior Barbosa Machado
ce65b8
ce65b8
    Add grok/write functions for new ppc core note sections
ce65b8
ce65b8
    This patch adds functions for grokking and writing more register core
ce65b8
    note sections (NT_PPC_TAR, NT_PPC_PPR, NT_PPC_DSCR, NT_PPC_EBB,
ce65b8
    NT_PPC_PMU, NT_PPC_TM_CGPR, NT_PPC_TM_CFPR, NT_PPC_TM_CVMX,
ce65b8
    NT_PPC_TM_CVSX, NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR,
ce65b8
    NT_PPC_TM_CDSCR).
ce65b8
ce65b8
    2018-07-16  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
ce65b8
ce65b8
    bfd/
ce65b8
        * elf-bfd.h (elfcore_write_ppc_tar): Add prototype.
ce65b8
        (elfcore_write_ppc_ppr): Likewise.
ce65b8
        (elfcore_write_ppc_dscr): Likewise.
ce65b8
        (elfcore_write_ppc_ebb): Likewise.
ce65b8
        (elfcore_write_ppc_pmu): Likewise.
ce65b8
        (elfcore_write_ppc_tm_cgpr): Likewise.
ce65b8
        (elfcore_write_ppc_tm_cfpr): Likewise.
ce65b8
        (elfcore_write_ppc_tm_cvmx): Likewise.
ce65b8
        (elfcore_write_ppc_tm_cvsx): Likewise.
ce65b8
        (elfcore_write_ppc_tm_spr): Likewise.
ce65b8
        (elfcore_write_ppc_tm_ctar): Likewise.
ce65b8
        (elfcore_write_ppc_tm_cppr): Likewise.
ce65b8
        (elfcore_write_ppc_tm_cdscr): Likewise.
ce65b8
        * elf.c (elfcore_write_ppc_tar): New function.
ce65b8
        (elfcore_write_ppc_ppr): Likewise.
ce65b8
        (elfcore_write_ppc_dscr): Likewise.
ce65b8
        (elfcore_write_ppc_ebb): Likewise.
ce65b8
        (elfcore_write_ppc_pmu): Likewise.
ce65b8
        (elfcore_write_ppc_tm_cgpr): Likewise.
ce65b8
        (elfcore_write_ppc_tm_cfpr): Likewise.
ce65b8
        (elfcore_write_ppc_tm_cvmx): Likewise.
ce65b8
        (elfcore_write_ppc_tm_cvsx): Likewise.
ce65b8
        (elfcore_write_ppc_tm_spr): Likewise.
ce65b8
        (elfcore_write_ppc_tm_ctar): Likewise.
ce65b8
        (elfcore_write_ppc_tm_cppr): Likewise.
ce65b8
        (elfcore_write_ppc_tm_cdscr): Likewise.
ce65b8
        (elfcore_write_register_note): Call them.
ce65b8
        (elfcore_grok_ppc_tar): New function.
ce65b8
        (elfcore_grok_ppc_ppr): Likewise.
ce65b8
        (elfcore_grok_ppc_dscr): Likewise.
ce65b8
        (elfcore_grok_ppc_ebb): Likewise.
ce65b8
        (elfcore_grok_ppc_pmu): Likewise.
ce65b8
        (elfcore_grok_ppc_tm_cgpr): Likewise.
ce65b8
        (elfcore_grok_ppc_tm_cfpr): Likewise.
ce65b8
        (elfcore_grok_ppc_tm_cvmx): Likewise.
ce65b8
        (elfcore_grok_ppc_tm_cvsx): Likewise.
ce65b8
        (elfcore_grok_ppc_tm_spr): Likewise.
ce65b8
        (elfcore_grok_ppc_tm_ctar): Likewise.
ce65b8
        (elfcore_grok_ppc_tm_cppr): Likewise.
ce65b8
        (elfcore_grok_ppc_tm_cdscr): Likewise.
ce65b8
        (elfcore_grok_note): Call them.
ce65b8
ce65b8
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
ce65b8
--- a/bfd/elf-bfd.h
ce65b8
+++ b/bfd/elf-bfd.h
ce65b8
@@ -2569,6 +2569,32 @@ extern char *elfcore_write_ppc_vmx
ce65b8
   (bfd *, char *, int *, const void *, int);
ce65b8
 extern char *elfcore_write_ppc_vsx
ce65b8
   (bfd *, char *, int *, const void *, int);
ce65b8
+extern char *elfcore_write_ppc_tar
ce65b8
+  (bfd *, char *, int *, const void *, int);
ce65b8
+extern char *elfcore_write_ppc_ppr
ce65b8
+  (bfd *, char *, int *, const void *, int);
ce65b8
+extern char *elfcore_write_ppc_dscr
ce65b8
+  (bfd *, char *, int *, const void *, int);
ce65b8
+extern char *elfcore_write_ppc_ebb
ce65b8
+  (bfd *, char *, int *, const void *, int);
ce65b8
+extern char *elfcore_write_ppc_pmu
ce65b8
+  (bfd *, char *, int *, const void *, int);
ce65b8
+extern char *elfcore_write_ppc_tm_cgpr
ce65b8
+  (bfd *, char *, int *, const void *, int);
ce65b8
+extern char *elfcore_write_ppc_tm_cfpr
ce65b8
+  (bfd *, char *, int *, const void *, int);
ce65b8
+extern char *elfcore_write_ppc_tm_cvmx
ce65b8
+  (bfd *, char *, int *, const void *, int);
ce65b8
+extern char *elfcore_write_ppc_tm_cvsx
ce65b8
+  (bfd *, char *, int *, const void *, int);
ce65b8
+extern char *elfcore_write_ppc_tm_spr
ce65b8
+  (bfd *, char *, int *, const void *, int);
ce65b8
+extern char *elfcore_write_ppc_tm_ctar
ce65b8
+  (bfd *, char *, int *, const void *, int);
ce65b8
+extern char *elfcore_write_ppc_tm_cppr
ce65b8
+  (bfd *, char *, int *, const void *, int);
ce65b8
+extern char *elfcore_write_ppc_tm_cdscr
ce65b8
+  (bfd *, char *, int *, const void *, int);
ce65b8
 extern char *elfcore_write_s390_timer
ce65b8
   (bfd *, char *, int *, const void *, int);
ce65b8
 extern char *elfcore_write_s390_todcmp
ce65b8
diff --git a/bfd/elf.c b/bfd/elf.c
ce65b8
--- a/bfd/elf.c
ce65b8
+++ b/bfd/elf.c
ce65b8
@@ -9239,6 +9239,84 @@ elfcore_grok_ppc_vsx (bfd *abfd, Elf_Internal_Note *note)
ce65b8
 }
ce65b8
 
ce65b8
 static bfd_boolean
ce65b8
+elfcore_grok_ppc_tar (bfd *abfd, Elf_Internal_Note *note)
ce65b8
+{
ce65b8
+  return elfcore_make_note_pseudosection (abfd, ".reg-ppc-tar", note);
ce65b8
+}
ce65b8
+
ce65b8
+static bfd_boolean
ce65b8
+elfcore_grok_ppc_ppr (bfd *abfd, Elf_Internal_Note *note)
ce65b8
+{
ce65b8
+  return elfcore_make_note_pseudosection (abfd, ".reg-ppc-ppr", note);
ce65b8
+}
ce65b8
+
ce65b8
+static bfd_boolean
ce65b8
+elfcore_grok_ppc_dscr (bfd *abfd, Elf_Internal_Note *note)
ce65b8
+{
ce65b8
+  return elfcore_make_note_pseudosection (abfd, ".reg-ppc-dscr", note);
ce65b8
+}
ce65b8
+
ce65b8
+static bfd_boolean
ce65b8
+elfcore_grok_ppc_ebb (bfd *abfd, Elf_Internal_Note *note)
ce65b8
+{
ce65b8
+  return elfcore_make_note_pseudosection (abfd, ".reg-ppc-ebb", note);
ce65b8
+}
ce65b8
+
ce65b8
+static bfd_boolean
ce65b8
+elfcore_grok_ppc_pmu (bfd *abfd, Elf_Internal_Note *note)
ce65b8
+{
ce65b8
+  return elfcore_make_note_pseudosection (abfd, ".reg-ppc-pmu", note);
ce65b8
+}
ce65b8
+
ce65b8
+static bfd_boolean
ce65b8
+elfcore_grok_ppc_tm_cgpr (bfd *abfd, Elf_Internal_Note *note)
ce65b8
+{
ce65b8
+  return elfcore_make_note_pseudosection (abfd, ".reg-ppc-tm-cgpr", note);
ce65b8
+}
ce65b8
+
ce65b8
+static bfd_boolean
ce65b8
+elfcore_grok_ppc_tm_cfpr (bfd *abfd, Elf_Internal_Note *note)
ce65b8
+{
ce65b8
+  return elfcore_make_note_pseudosection (abfd, ".reg-ppc-tm-cfpr", note);
ce65b8
+}
ce65b8
+
ce65b8
+static bfd_boolean
ce65b8
+elfcore_grok_ppc_tm_cvmx (bfd *abfd, Elf_Internal_Note *note)
ce65b8
+{
ce65b8
+  return elfcore_make_note_pseudosection (abfd, ".reg-ppc-tm-cvmx", note);
ce65b8
+}
ce65b8
+
ce65b8
+static bfd_boolean
ce65b8
+elfcore_grok_ppc_tm_cvsx (bfd *abfd, Elf_Internal_Note *note)
ce65b8
+{
ce65b8
+  return elfcore_make_note_pseudosection (abfd, ".reg-ppc-tm-cvsx", note);
ce65b8
+}
ce65b8
+
ce65b8
+static bfd_boolean
ce65b8
+elfcore_grok_ppc_tm_spr (bfd *abfd, Elf_Internal_Note *note)
ce65b8
+{
ce65b8
+  return elfcore_make_note_pseudosection (abfd, ".reg-ppc-tm-spr", note);
ce65b8
+}
ce65b8
+
ce65b8
+static bfd_boolean
ce65b8
+elfcore_grok_ppc_tm_ctar (bfd *abfd, Elf_Internal_Note *note)
ce65b8
+{
ce65b8
+  return elfcore_make_note_pseudosection (abfd, ".reg-ppc-tm-ctar", note);
ce65b8
+}
ce65b8
+
ce65b8
+static bfd_boolean
ce65b8
+elfcore_grok_ppc_tm_cppr (bfd *abfd, Elf_Internal_Note *note)
ce65b8
+{
ce65b8
+  return elfcore_make_note_pseudosection (abfd, ".reg-ppc-tm-cppr", note);
ce65b8
+}
ce65b8
+
ce65b8
+static bfd_boolean
ce65b8
+elfcore_grok_ppc_tm_cdscr (bfd *abfd, Elf_Internal_Note *note)
ce65b8
+{
ce65b8
+  return elfcore_make_note_pseudosection (abfd, ".reg-ppc-tm-cdscr", note);
ce65b8
+}
ce65b8
+
ce65b8
+static bfd_boolean
ce65b8
 elfcore_grok_s390_high_gprs (bfd *abfd, Elf_Internal_Note *note)
ce65b8
 {
ce65b8
   return elfcore_make_note_pseudosection (abfd, ".reg-s390-high-gprs", note);
ce65b8
@@ -9717,6 +9795,97 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
ce65b8
       else
ce65b8
 	return TRUE;
ce65b8
 
ce65b8
+    case NT_PPC_TAR:
ce65b8
+      if (note->namesz == 6
ce65b8
+          && strcmp (note->namedata, "LINUX") == 0)
ce65b8
+        return elfcore_grok_ppc_tar (abfd, note);
ce65b8
+      else
ce65b8
+        return TRUE;
ce65b8
+
ce65b8
+    case NT_PPC_PPR:
ce65b8
+      if (note->namesz == 6
ce65b8
+          && strcmp (note->namedata, "LINUX") == 0)
ce65b8
+        return elfcore_grok_ppc_ppr (abfd, note);
ce65b8
+      else
ce65b8
+        return TRUE;
ce65b8
+
ce65b8
+    case NT_PPC_DSCR:
ce65b8
+      if (note->namesz == 6
ce65b8
+          && strcmp (note->namedata, "LINUX") == 0)
ce65b8
+        return elfcore_grok_ppc_dscr (abfd, note);
ce65b8
+      else
ce65b8
+        return TRUE;
ce65b8
+
ce65b8
+    case NT_PPC_EBB:
ce65b8
+      if (note->namesz == 6
ce65b8
+          && strcmp (note->namedata, "LINUX") == 0)
ce65b8
+        return elfcore_grok_ppc_ebb (abfd, note);
ce65b8
+      else
ce65b8
+        return TRUE;
ce65b8
+
ce65b8
+    case NT_PPC_PMU:
ce65b8
+      if (note->namesz == 6
ce65b8
+          && strcmp (note->namedata, "LINUX") == 0)
ce65b8
+        return elfcore_grok_ppc_pmu (abfd, note);
ce65b8
+      else
ce65b8
+        return TRUE;
ce65b8
+
ce65b8
+    case NT_PPC_TM_CGPR:
ce65b8
+      if (note->namesz == 6
ce65b8
+          && strcmp (note->namedata, "LINUX") == 0)
ce65b8
+        return elfcore_grok_ppc_tm_cgpr (abfd, note);
ce65b8
+      else
ce65b8
+        return TRUE;
ce65b8
+
ce65b8
+    case NT_PPC_TM_CFPR:
ce65b8
+      if (note->namesz == 6
ce65b8
+          && strcmp (note->namedata, "LINUX") == 0)
ce65b8
+        return elfcore_grok_ppc_tm_cfpr (abfd, note);
ce65b8
+      else
ce65b8
+        return TRUE;
ce65b8
+
ce65b8
+    case NT_PPC_TM_CVMX:
ce65b8
+      if (note->namesz == 6
ce65b8
+          && strcmp (note->namedata, "LINUX") == 0)
ce65b8
+        return elfcore_grok_ppc_tm_cvmx (abfd, note);
ce65b8
+      else
ce65b8
+        return TRUE;
ce65b8
+
ce65b8
+    case NT_PPC_TM_CVSX:
ce65b8
+      if (note->namesz == 6
ce65b8
+          && strcmp (note->namedata, "LINUX") == 0)
ce65b8
+        return elfcore_grok_ppc_tm_cvsx (abfd, note);
ce65b8
+      else
ce65b8
+        return TRUE;
ce65b8
+
ce65b8
+    case NT_PPC_TM_SPR:
ce65b8
+      if (note->namesz == 6
ce65b8
+          && strcmp (note->namedata, "LINUX") == 0)
ce65b8
+        return elfcore_grok_ppc_tm_spr (abfd, note);
ce65b8
+      else
ce65b8
+        return TRUE;
ce65b8
+
ce65b8
+    case NT_PPC_TM_CTAR:
ce65b8
+      if (note->namesz == 6
ce65b8
+          && strcmp (note->namedata, "LINUX") == 0)
ce65b8
+        return elfcore_grok_ppc_tm_ctar (abfd, note);
ce65b8
+      else
ce65b8
+        return TRUE;
ce65b8
+
ce65b8
+    case NT_PPC_TM_CPPR:
ce65b8
+      if (note->namesz == 6
ce65b8
+          && strcmp (note->namedata, "LINUX") == 0)
ce65b8
+        return elfcore_grok_ppc_tm_cppr (abfd, note);
ce65b8
+      else
ce65b8
+        return TRUE;
ce65b8
+
ce65b8
+    case NT_PPC_TM_CDSCR:
ce65b8
+      if (note->namesz == 6
ce65b8
+          && strcmp (note->namedata, "LINUX") == 0)
ce65b8
+        return elfcore_grok_ppc_tm_cdscr (abfd, note);
ce65b8
+      else
ce65b8
+        return TRUE;
ce65b8
+
ce65b8
     case NT_S390_HIGH_GPRS:
ce65b8
       if (note->namesz == 6
ce65b8
 	  && strcmp (note->namedata, "LINUX") == 0)
ce65b8
@@ -10817,6 +10986,162 @@ elfcore_write_ppc_vsx (bfd *abfd,
ce65b8
 			     note_name, NT_PPC_VSX, ppc_vsx, size);
ce65b8
 }
ce65b8
 
ce65b8
+char *
ce65b8
+elfcore_write_ppc_tar (bfd *abfd,
ce65b8
+                       char *buf,
ce65b8
+                       int *bufsiz,
ce65b8
+                       const void *ppc_tar,
ce65b8
+                       int size)
ce65b8
+{
ce65b8
+  char *note_name = "LINUX";
ce65b8
+  return elfcore_write_note (abfd, buf, bufsiz,
ce65b8
+                             note_name, NT_PPC_TAR, ppc_tar, size);
ce65b8
+}
ce65b8
+
ce65b8
+char *
ce65b8
+elfcore_write_ppc_ppr (bfd *abfd,
ce65b8
+                       char *buf,
ce65b8
+                       int *bufsiz,
ce65b8
+                       const void *ppc_ppr,
ce65b8
+                       int size)
ce65b8
+{
ce65b8
+  char *note_name = "LINUX";
ce65b8
+  return elfcore_write_note (abfd, buf, bufsiz,
ce65b8
+                             note_name, NT_PPC_PPR, ppc_ppr, size);
ce65b8
+}
ce65b8
+
ce65b8
+char *
ce65b8
+elfcore_write_ppc_dscr (bfd *abfd,
ce65b8
+                        char *buf,
ce65b8
+                        int *bufsiz,
ce65b8
+                        const void *ppc_dscr,
ce65b8
+                        int size)
ce65b8
+{
ce65b8
+  char *note_name = "LINUX";
ce65b8
+  return elfcore_write_note (abfd, buf, bufsiz,
ce65b8
+                             note_name, NT_PPC_DSCR, ppc_dscr, size);
ce65b8
+}
ce65b8
+
ce65b8
+char *
ce65b8
+elfcore_write_ppc_ebb (bfd *abfd,
ce65b8
+                       char *buf,
ce65b8
+                       int *bufsiz,
ce65b8
+                       const void *ppc_ebb,
ce65b8
+                       int size)
ce65b8
+{
ce65b8
+  char *note_name = "LINUX";
ce65b8
+  return elfcore_write_note (abfd, buf, bufsiz,
ce65b8
+                             note_name, NT_PPC_EBB, ppc_ebb, size);
ce65b8
+}
ce65b8
+
ce65b8
+char *
ce65b8
+elfcore_write_ppc_pmu (bfd *abfd,
ce65b8
+                       char *buf,
ce65b8
+                       int *bufsiz,
ce65b8
+                       const void *ppc_pmu,
ce65b8
+                       int size)
ce65b8
+{
ce65b8
+  char *note_name = "LINUX";
ce65b8
+  return elfcore_write_note (abfd, buf, bufsiz,
ce65b8
+                             note_name, NT_PPC_PMU, ppc_pmu, size);
ce65b8
+}
ce65b8
+
ce65b8
+char *
ce65b8
+elfcore_write_ppc_tm_cgpr (bfd *abfd,
ce65b8
+                           char *buf,
ce65b8
+                           int *bufsiz,
ce65b8
+                           const void *ppc_tm_cgpr,
ce65b8
+                           int size)
ce65b8
+{
ce65b8
+  char *note_name = "LINUX";
ce65b8
+  return elfcore_write_note (abfd, buf, bufsiz,
ce65b8
+                             note_name, NT_PPC_TM_CGPR, ppc_tm_cgpr, size);
ce65b8
+}
ce65b8
+
ce65b8
+char *
ce65b8
+elfcore_write_ppc_tm_cfpr (bfd *abfd,
ce65b8
+                           char *buf,
ce65b8
+                           int *bufsiz,
ce65b8
+                           const void *ppc_tm_cfpr,
ce65b8
+                           int size)
ce65b8
+{
ce65b8
+  char *note_name = "LINUX";
ce65b8
+  return elfcore_write_note (abfd, buf, bufsiz,
ce65b8
+                             note_name, NT_PPC_TM_CFPR, ppc_tm_cfpr, size);
ce65b8
+}
ce65b8
+
ce65b8
+char *
ce65b8
+elfcore_write_ppc_tm_cvmx (bfd *abfd,
ce65b8
+                           char *buf,
ce65b8
+                           int *bufsiz,
ce65b8
+                           const void *ppc_tm_cvmx,
ce65b8
+                           int size)
ce65b8
+{
ce65b8
+  char *note_name = "LINUX";
ce65b8
+  return elfcore_write_note (abfd, buf, bufsiz,
ce65b8
+                             note_name, NT_PPC_TM_CVMX, ppc_tm_cvmx, size);
ce65b8
+}
ce65b8
+
ce65b8
+char *
ce65b8
+elfcore_write_ppc_tm_cvsx (bfd *abfd,
ce65b8
+                           char *buf,
ce65b8
+                           int *bufsiz,
ce65b8
+                           const void *ppc_tm_cvsx,
ce65b8
+                           int size)
ce65b8
+{
ce65b8
+  char *note_name = "LINUX";
ce65b8
+  return elfcore_write_note (abfd, buf, bufsiz,
ce65b8
+                             note_name, NT_PPC_TM_CVSX, ppc_tm_cvsx, size);
ce65b8
+}
ce65b8
+
ce65b8
+char *
ce65b8
+elfcore_write_ppc_tm_spr (bfd *abfd,
ce65b8
+                          char *buf,
ce65b8
+                          int *bufsiz,
ce65b8
+                          const void *ppc_tm_spr,
ce65b8
+                          int size)
ce65b8
+{
ce65b8
+  char *note_name = "LINUX";
ce65b8
+  return elfcore_write_note (abfd, buf, bufsiz,
ce65b8
+                             note_name, NT_PPC_TM_SPR, ppc_tm_spr, size);
ce65b8
+}
ce65b8
+
ce65b8
+char *
ce65b8
+elfcore_write_ppc_tm_ctar (bfd *abfd,
ce65b8
+                           char *buf,
ce65b8
+                           int *bufsiz,
ce65b8
+                           const void *ppc_tm_ctar,
ce65b8
+                           int size)
ce65b8
+{
ce65b8
+  char *note_name = "LINUX";
ce65b8
+  return elfcore_write_note (abfd, buf, bufsiz,
ce65b8
+                             note_name, NT_PPC_TM_CTAR, ppc_tm_ctar, size);
ce65b8
+}
ce65b8
+
ce65b8
+char *
ce65b8
+elfcore_write_ppc_tm_cppr (bfd *abfd,
ce65b8
+                           char *buf,
ce65b8
+                           int *bufsiz,
ce65b8
+                           const void *ppc_tm_cppr,
ce65b8
+                           int size)
ce65b8
+{
ce65b8
+  char *note_name = "LINUX";
ce65b8
+  return elfcore_write_note (abfd, buf, bufsiz,
ce65b8
+                             note_name, NT_PPC_TM_CPPR, ppc_tm_cppr, size);
ce65b8
+}
ce65b8
+
ce65b8
+char *
ce65b8
+elfcore_write_ppc_tm_cdscr (bfd *abfd,
ce65b8
+                            char *buf,
ce65b8
+                            int *bufsiz,
ce65b8
+                            const void *ppc_tm_cdscr,
ce65b8
+                            int size)
ce65b8
+{
ce65b8
+  char *note_name = "LINUX";
ce65b8
+  return elfcore_write_note (abfd, buf, bufsiz,
ce65b8
+                             note_name, NT_PPC_TM_CDSCR, ppc_tm_cdscr, size);
ce65b8
+}
ce65b8
+
ce65b8
 static char *
ce65b8
 elfcore_write_s390_high_gprs (bfd *abfd,
ce65b8
 			      char *buf,
ce65b8
@@ -11045,6 +11370,32 @@ elfcore_write_register_note (bfd *abfd,
ce65b8
     return elfcore_write_ppc_vmx (abfd, buf, bufsiz, data, size);
ce65b8
   if (strcmp (section, ".reg-ppc-vsx") == 0)
ce65b8
     return elfcore_write_ppc_vsx (abfd, buf, bufsiz, data, size);
ce65b8
+  if (strcmp (section, ".reg-ppc-tar") == 0)
ce65b8
+    return elfcore_write_ppc_tar (abfd, buf, bufsiz, data, size);
ce65b8
+  if (strcmp (section, ".reg-ppc-ppr") == 0)
ce65b8
+    return elfcore_write_ppc_ppr (abfd, buf, bufsiz, data, size);
ce65b8
+  if (strcmp (section, ".reg-ppc-dscr") == 0)
ce65b8
+    return elfcore_write_ppc_dscr (abfd, buf, bufsiz, data, size);
ce65b8
+  if (strcmp (section, ".reg-ppc-ebb") == 0)
ce65b8
+    return elfcore_write_ppc_ebb (abfd, buf, bufsiz, data, size);
ce65b8
+  if (strcmp (section, ".reg-ppc-pmu") == 0)
ce65b8
+    return elfcore_write_ppc_pmu (abfd, buf, bufsiz, data, size);
ce65b8
+  if (strcmp (section, ".reg-ppc-tm-cgpr") == 0)
ce65b8
+    return elfcore_write_ppc_tm_cgpr (abfd, buf, bufsiz, data, size);
ce65b8
+  if (strcmp (section, ".reg-ppc-tm-cfpr") == 0)
ce65b8
+    return elfcore_write_ppc_tm_cfpr (abfd, buf, bufsiz, data, size);
ce65b8
+  if (strcmp (section, ".reg-ppc-tm-cvmx") == 0)
ce65b8
+    return elfcore_write_ppc_tm_cvmx (abfd, buf, bufsiz, data, size);
ce65b8
+  if (strcmp (section, ".reg-ppc-tm-cvsx") == 0)
ce65b8
+    return elfcore_write_ppc_tm_cvsx (abfd, buf, bufsiz, data, size);
ce65b8
+  if (strcmp (section, ".reg-ppc-tm-spr") == 0)
ce65b8
+    return elfcore_write_ppc_tm_spr (abfd, buf, bufsiz, data, size);
ce65b8
+  if (strcmp (section, ".reg-ppc-tm-ctar") == 0)
ce65b8
+    return elfcore_write_ppc_tm_ctar (abfd, buf, bufsiz, data, size);
ce65b8
+  if (strcmp (section, ".reg-ppc-tm-cppr") == 0)
ce65b8
+    return elfcore_write_ppc_tm_cppr (abfd, buf, bufsiz, data, size);
ce65b8
+  if (strcmp (section, ".reg-ppc-tm-cdscr") == 0)
ce65b8
+    return elfcore_write_ppc_tm_cdscr (abfd, buf, bufsiz, data, size);
ce65b8
   if (strcmp (section, ".reg-s390-high-gprs") == 0)
ce65b8
     return elfcore_write_s390_high_gprs (abfd, buf, bufsiz, data, size);
ce65b8
   if (strcmp (section, ".reg-s390-timer") == 0)