Blob Blame History Raw
diff -Nrup a/bfd/elf-bfd.h b/bfd/elf-bfd.h
--- a/bfd/elf-bfd.h	2013-02-27 13:28:03.000000000 -0700
+++ b/bfd/elf-bfd.h	2013-07-05 11:39:18.762450452 -0600
@@ -2313,6 +2313,8 @@ extern char *elfcore_write_s390_last_bre
   (bfd *, char *, int *, const void *, int);
 extern char *elfcore_write_s390_system_call
   (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_s390_tdb
+  (bfd *, char *, int *, const void *, int);
 extern char *elfcore_write_arm_vfp
   (bfd *, char *, int *, const void *, int);
 extern char *elfcore_write_aarch_tls
diff -Nrup a/bfd/elf.c b/bfd/elf.c
--- a/bfd/elf.c	2013-07-05 11:31:18.420113594 -0600
+++ b/bfd/elf.c	2013-07-05 11:39:18.764450445 -0600
@@ -8293,6 +8293,12 @@ elfcore_grok_s390_system_call (bfd *abfd
 }
 
 static bfd_boolean
+elfcore_grok_s390_tdb (bfd *abfd, Elf_Internal_Note *note)
+{
+  return elfcore_make_note_pseudosection (abfd, ".reg-s390-tdb", note);
+}
+
+static bfd_boolean
 elfcore_grok_arm_vfp (bfd *abfd, Elf_Internal_Note *note)
 {
   return elfcore_make_note_pseudosection (abfd, ".reg-arm-vfp", note);
@@ -8749,6 +8755,13 @@ elfcore_grok_note (bfd *abfd, Elf_Intern
       else
         return TRUE;
 
+    case NT_S390_TDB:
+      if (note->namesz == 6
+          && strcmp (note->namedata, "LINUX") == 0)
+        return elfcore_grok_s390_tdb (abfd, note);
+      else
+        return TRUE;
+
     case NT_ARM_VFP:
       if (note->namesz == 6
 	  && strcmp (note->namedata, "LINUX") == 0)
@@ -9603,6 +9616,18 @@ elfcore_write_s390_system_call (bfd *abf
 }
 
 char *
+elfcore_write_s390_tdb (bfd *abfd,
+			char *buf,
+			int *bufsiz,
+			const void *s390_tdb,
+			int size)
+{
+  char *note_name = "LINUX";
+  return elfcore_write_note (abfd, buf, bufsiz,
+                             note_name, NT_S390_TDB, s390_tdb, size);
+}
+
+char *
 elfcore_write_arm_vfp (bfd *abfd,
 		       char *buf,
 		       int *bufsiz,
@@ -9684,6 +9709,8 @@ elfcore_write_register_note (bfd *abfd,
     return elfcore_write_s390_last_break (abfd, buf, bufsiz, data, size);
   if (strcmp (section, ".reg-s390-system-call") == 0)
     return elfcore_write_s390_system_call (abfd, buf, bufsiz, data, size);
+  if (strcmp (section, ".reg-s390-tdb") == 0)
+    return elfcore_write_s390_tdb (abfd, buf, bufsiz, data, size);
   if (strcmp (section, ".reg-arm-vfp") == 0)
     return elfcore_write_arm_vfp (abfd, buf, bufsiz, data, size);
   if (strcmp (section, ".reg-aarch-tls") == 0)
diff -Nrup a/binutils/readelf.c b/binutils/readelf.c
--- a/binutils/readelf.c	2013-02-27 13:28:03.000000000 -0700
+++ b/binutils/readelf.c	2013-07-05 11:39:18.766450438 -0600
@@ -12848,6 +12848,8 @@ get_note_type (unsigned e_type)
 	return _("NT_S390_LAST_BREAK (s390 last breaking event address)");
       case NT_S390_SYSTEM_CALL:
 	return _("NT_S390_SYSTEM_CALL (s390 system call restart data)");
+      case NT_S390_TDB:
+	return _("NT_S390_TDB (s390 transaction diagnostic block)");
       case NT_ARM_VFP:
 	return _("NT_ARM_VFP (arm VFP registers)");
       case NT_ARM_TLS:
diff -Nrup a/include/elf/common.h b/include/elf/common.h
--- a/include/elf/common.h	2013-02-27 13:28:03.000000000 -0700
+++ b/include/elf/common.h	2013-07-05 11:39:18.766450438 -0600
@@ -556,6 +556,8 @@
 					/*   note name must be "LINUX".  */
 #define NT_S390_SYSTEM_CALL     0x307   /* S390 system call restart data */
 					/*   note name must be "LINUX".  */
+#define NT_S390_TDB	0x308		/* S390 transaction diagnostic block */
+					/*   note name must be "LINUX".  */
 #define NT_ARM_VFP	0x400		/* ARM VFP registers */
 /* The following definitions should really use NT_AARCH_..., but defined
    this way for compatibility with Linux.  */