* elf-bfd.h (elfcore_write_s390_tdb): Add prototype.
[deliverable/binutils-gdb.git] / bfd / elf.c
index e0487c2c915235cc9e5788a2d4a7cb1f8c5a4706..3ba7e5f11ab4626e3729719dce8e3ff7404d1a6c 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1,9 +1,6 @@
 /* ELF executable support for BFD.
 
-   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
-   2013
-   Free Software Foundation, Inc.
+   Copyright 1993-2013 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -8174,6 +8171,12 @@ elfcore_grok_s390_system_call (bfd *abfd, Elf_Internal_Note *note)
   return elfcore_make_note_pseudosection (abfd, ".reg-s390-system-call", note);
 }
 
+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)
 {
@@ -8631,6 +8634,13 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
       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)
@@ -9484,6 +9494,18 @@ elfcore_write_s390_system_call (bfd *abfd,
                             s390_system_call, size);
 }
 
+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,
@@ -9566,6 +9588,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)
This page took 0.024901 seconds and 4 git commands to generate.