bfd/
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 9 Feb 2010 12:14:43 +0000 (12:14 +0000)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 9 Feb 2010 12:14:43 +0000 (12:14 +0000)
2010-02-09  Michael Holzheu  <holzheu@de.ibm.com>

* elf-bfd.h (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
elfcore_write_s390_prefix): New.
* elf.c (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
elfcore_write_s390_prefix): New.
(elfcore_grok_note): Handle NT_S390_TIMER, NT_S390_TODCMP,
NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX.
(elfcore_write_register_note): Handle .reg-s390-timer,
.reg-s390-todcmp, .reg-s390-todpreg, .reg-s390-ctrs,
.reg-s390-prefix section.

binutils/

2010-02-09  Michael Holzheu  <holzheu@de.ibm.com>

* readelf.c (get_note_type): Handle NT_S390_TIMER, NT_S390_TODCMP,
NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX.

include/elf/

2010-02-09  Michael Holzheu  <holzheu@de.ibm.com>

* common.h (NT_S390_TIMER, NT_S390_TODCMP, NT_S390_TODPREG,
NT_S390_CTRS and NT_S390_PREFIX): Define.

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

index ceca41626f7d2a4a435cbbc8ff5dba8495f3bb87..597e4ca62723a03af9e8f571b9b4fd2deb6eaddb 100644 (file)
@@ -1,3 +1,17 @@
+2010-02-09  Michael Holzheu  <holzheu@de.ibm.com>
+
+       * elf-bfd.h (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
+       elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
+       elfcore_write_s390_prefix): New.
+       * elf.c (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
+       elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
+       elfcore_write_s390_prefix): New.
+       (elfcore_grok_note): Handle NT_S390_TIMER, NT_S390_TODCMP,
+       NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX.
+       (elfcore_write_register_note): Handle .reg-s390-timer, 
+       .reg-s390-todcmp, .reg-s390-todpreg, .reg-s390-ctrs,
+       .reg-s390-prefix section.
+
 2010-02-09  Alan Modra  <amodra@gmail.com>
 
        * elf64-ppc.c (struct got_entry): Make tls_type and is_indirect
index 681ded517114f03bf8adfa2ec4e90795fb18b568..6d4b8dd1730fdbab0714d55b5574fc23b3e24ee4 100644 (file)
@@ -2175,6 +2175,16 @@ extern char *elfcore_write_ppc_vmx
   (bfd *, char *, int *, const void *, int);
 extern char *elfcore_write_ppc_vsx
   (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_s390_timer
+  (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_s390_todcmp
+  (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_s390_todpreg
+  (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_s390_ctrs
+  (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_s390_prefix
+  (bfd *, char *, int *, const void *, int);
 extern char *elfcore_write_lwpstatus
   (bfd *, char *, int *, long, int, const void *);
 extern char *elfcore_write_register_note
index 795a9d2eb2b6eb955ecbcf89c631273635e515a0..81a21f54a2948905ff4b96c9d0162edee3f600aa 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -7672,6 +7672,36 @@ elfcore_grok_s390_high_gprs (bfd *abfd, Elf_Internal_Note *note)
   return elfcore_make_note_pseudosection (abfd, ".reg-s390-high-gprs", note);
 }
 
+static bfd_boolean
+elfcore_grok_s390_timer (bfd *abfd, Elf_Internal_Note *note)
+{
+  return elfcore_make_note_pseudosection (abfd, ".reg-s390-timer", note);
+}
+
+static bfd_boolean
+elfcore_grok_s390_todcmp (bfd *abfd, Elf_Internal_Note *note)
+{
+  return elfcore_make_note_pseudosection (abfd, ".reg-s390-todcmp", note);
+}
+
+static bfd_boolean
+elfcore_grok_s390_todpreg (bfd *abfd, Elf_Internal_Note *note)
+{
+  return elfcore_make_note_pseudosection (abfd, ".reg-s390-todpreg", note);
+}
+
+static bfd_boolean
+elfcore_grok_s390_ctrs (bfd *abfd, Elf_Internal_Note *note)
+{
+  return elfcore_make_note_pseudosection (abfd, ".reg-s390-ctrs", note);
+}
+
+static bfd_boolean
+elfcore_grok_s390_prefix (bfd *abfd, Elf_Internal_Note *note)
+{
+  return elfcore_make_note_pseudosection (abfd, ".reg-s390-prefix", note);
+}
+
 #if defined (HAVE_PRPSINFO_T)
 typedef prpsinfo_t   elfcore_psinfo_t;
 #if defined (HAVE_PRPSINFO32_T)                /* Sparc64 cross Sparc32 */
@@ -8050,6 +8080,41 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
       else
         return TRUE;
 
+    case NT_S390_TIMER:
+      if (note->namesz == 6
+          && strcmp (note->namedata, "LINUX") == 0)
+        return elfcore_grok_s390_timer (abfd, note);
+      else
+        return TRUE;
+
+    case NT_S390_TODCMP:
+      if (note->namesz == 6
+          && strcmp (note->namedata, "LINUX") == 0)
+        return elfcore_grok_s390_todcmp (abfd, note);
+      else
+        return TRUE;
+
+    case NT_S390_TODPREG:
+      if (note->namesz == 6
+          && strcmp (note->namedata, "LINUX") == 0)
+        return elfcore_grok_s390_todpreg (abfd, note);
+      else
+        return TRUE;
+
+    case NT_S390_CTRS:
+      if (note->namesz == 6
+          && strcmp (note->namedata, "LINUX") == 0)
+        return elfcore_grok_s390_ctrs (abfd, note);
+      else
+        return TRUE;
+
+    case NT_S390_PREFIX:
+      if (note->namesz == 6
+          && strcmp (note->namedata, "LINUX") == 0)
+        return elfcore_grok_s390_prefix (abfd, note);
+      else
+        return TRUE;
+
     case NT_PRPSINFO:
     case NT_PSINFO:
       if (bed->elf_backend_grok_psinfo)
@@ -8714,6 +8779,66 @@ elfcore_write_s390_high_gprs (bfd *abfd,
                             s390_high_gprs, size);
 }
 
+char *
+elfcore_write_s390_timer (bfd *abfd,
+                          char *buf,
+                          int *bufsiz,
+                          const void *s390_timer,
+                          int size)
+{
+  char *note_name = "LINUX";
+  return elfcore_write_note (abfd, buf, bufsiz,
+                             note_name, NT_S390_TIMER, s390_timer, size);
+}
+
+char *
+elfcore_write_s390_todcmp (bfd *abfd,
+                           char *buf,
+                           int *bufsiz,
+                           const void *s390_todcmp,
+                           int size)
+{
+  char *note_name = "LINUX";
+  return elfcore_write_note (abfd, buf, bufsiz,
+                             note_name, NT_S390_TODCMP, s390_todcmp, size);
+}
+
+char *
+elfcore_write_s390_todpreg (bfd *abfd,
+                            char *buf,
+                            int *bufsiz,
+                            const void *s390_todpreg,
+                            int size)
+{
+  char *note_name = "LINUX";
+  return elfcore_write_note (abfd, buf, bufsiz,
+                             note_name, NT_S390_TODPREG, s390_todpreg, size);
+}
+
+char *
+elfcore_write_s390_ctrs (bfd *abfd,
+                         char *buf,
+                         int *bufsiz,
+                         const void *s390_ctrs,
+                         int size)
+{
+  char *note_name = "LINUX";
+  return elfcore_write_note (abfd, buf, bufsiz,
+                             note_name, NT_S390_CTRS, s390_ctrs, size);
+}
+
+char *
+elfcore_write_s390_prefix (bfd *abfd,
+                           char *buf,
+                           int *bufsiz,
+                           const void *s390_prefix,
+                           int size)
+{
+  char *note_name = "LINUX";
+  return elfcore_write_note (abfd, buf, bufsiz,
+                             note_name, NT_S390_PREFIX, s390_prefix, size);
+}
+
 char *
 elfcore_write_register_note (bfd *abfd,
                             char *buf,
@@ -8734,6 +8859,16 @@ elfcore_write_register_note (bfd *abfd,
     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);
+  if (strcmp (section, ".reg-s390-timer") == 0)
+    return elfcore_write_s390_timer (abfd, buf, bufsiz, data, size);
+  if (strcmp (section, ".reg-s390-todcmp") == 0)
+    return elfcore_write_s390_todcmp (abfd, buf, bufsiz, data, size);
+  if (strcmp (section, ".reg-s390-todpreg") == 0)
+    return elfcore_write_s390_todpreg (abfd, buf, bufsiz, data, size);
+  if (strcmp (section, ".reg-s390-ctrs") == 0)
+    return elfcore_write_s390_ctrs (abfd, buf, bufsiz, data, size);
+  if (strcmp (section, ".reg-s390-prefix") == 0)
+    return elfcore_write_s390_prefix (abfd, buf, bufsiz, data, size);
   return NULL;
 }
 
index 8987c417537180fff19aec67230f37dc0ef941a8..4310f72872b06bd971a368fabf79aede6319b2db 100644 (file)
@@ -1,3 +1,8 @@
+2010-02-09  Michael Holzheu  <holzheu@de.ibm.com>
+
+       * readelf.c (get_note_type): Handle NT_S390_TIMER, NT_S390_TODCMP,
+       NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX.
+
 2010-02-08  Jim Blandy  <jimb@red-bean.com>
 
        * dwarf.c (display_debug_frames): Skip the 'S' character in CFI
index 34dbfacf516db08aabea84b25740fe144d567d95..6994289522e77c99b5fb152bea1626bfa9180324 100644 (file)
@@ -10419,6 +10419,16 @@ get_note_type (unsigned e_type)
        return _("NT_X86_XSTATE (x86 XSAVE extended state)");
       case NT_S390_HIGH_GPRS:
        return _("NT_S390_HIGH_GPRS (s390 upper register halves)");
+      case NT_S390_TIMER:
+       return _("NT_S390_TIMER (s390 timer register)");
+      case NT_S390_TODCMP:
+       return _("NT_S390_TODCMP (s390 TOD comparator register)");
+      case NT_S390_TODPREG:
+       return _("NT_S390_TODPREG (s390 TOD programmable register)");
+      case NT_S390_CTRS:
+       return _("NT_S390_CTRS (s390 control registers)");
+      case NT_S390_PREFIX:
+       return _("NT_S390_PREFIX (s390 prefix register)");
       case NT_PSTATUS:
        return _("NT_PSTATUS (pstatus structure)");
       case NT_FPREGS:
index c532fecd5b63e06b7dfcaf6e238795955fee1594..6ebc8965ae43d8cd0a6cac4079360ffd59b4e96d 100644 (file)
@@ -1,3 +1,8 @@
+2010-02-09  Michael Holzheu  <holzheu@de.ibm.com>
+
+       * common.h (NT_S390_TIMER, NT_S390_TODCMP, NT_S390_TODPREG,
+       NT_S390_CTRS and NT_S390_PREFIX): Define.
+
 2010-02-02  H.J. Lu  <hongjiu.lu@intel.com>
 
        * common.h (NT_386_XSTATE): New.
index a7629023193b850f4e116273fb435004dc4d5b6b..e7ffac4b7b6a67e272b06c9c5ae300e04c29d981 100644 (file)
                                        /*   note name must be "LINUX".  */
 #define NT_S390_HIGH_GPRS 0x300                /* S/390 upper halves of GPRs  */
                                        /*   note name must be "LINUX".  */
+#define NT_S390_TIMER  0x301           /* S390 timer */
+                                       /*   note name must be "LINUX".  */
+#define NT_S390_TODCMP 0x302           /* S390 TOD clock comparator */
+                                       /*   note name must be "LINUX".  */
+#define NT_S390_TODPREG        0x303           /* S390 TOD programmable register */
+                                       /*   note name must be "LINUX".  */
+#define NT_S390_CTRS   0x304           /* S390 control registers */
+                                       /*   note name must be "LINUX".  */
+#define NT_S390_PREFIX 0x305           /* S390 prefix register */
+                                       /*   note name must be "LINUX".  */
 
 /* Note segments for core files on dir-style procfs systems.  */