include/elf/ChangeLog:
authorUlrich Weigand <uweigand@de.ibm.com>
Tue, 6 Dec 2011 14:09:12 +0000 (14:09 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Tue, 6 Dec 2011 14:09:12 +0000 (14:09 +0000)
* common.h (NT_S390_LAST_BREAK): Define.
(NT_S390_SYSTEM_CALL): Likewise.

bfd/ChangeLog:

* elf-bfd.h (elfcore_write_s390_last_break): Add prototype.
(elfcore_write_s390_system_call): Likewise.
* elf.c (elfcore_write_s390_last_break): New function.
(elfcore_write_s390_system_call): Likewise.
(elfcore_write_register_note): Call them.
(elfcore_grok_s390_last_break): New function.
(elfcore_grok_s390_system_call): Likewise.
(elfcore_grok_note): Call them.

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

index 2f7f59a4f98f3325ca249b8f26df14258c77e91b..00b09af82e01275c05915e8442e922b278601010 100644 (file)
@@ -1,3 +1,14 @@
+2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * elf-bfd.h (elfcore_write_s390_last_break): Add prototype.
+       (elfcore_write_s390_system_call): Likewise.
+       * elf.c (elfcore_write_s390_last_break): New function.
+       (elfcore_write_s390_system_call): Likewise.
+       (elfcore_write_register_note): Call them.
+       (elfcore_grok_s390_last_break): New function.
+       (elfcore_grok_s390_system_call): Likewise.
+       (elfcore_grok_note): Call them.
+
 2011-12-05  Tristan Gingold  <gingold@adacore.com>
 
        * mach-o.c (bfd_mach_o_read_symtab_symbol): Accept indirect symbols.
index d6e2ab29ce4d8282a1d719c81eea3e46ce201acd..486b76eecf123488e11785a9b35d30dad74479b4 100644 (file)
@@ -2237,6 +2237,10 @@ 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_s390_last_break
+  (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_s390_system_call
+  (bfd *, char *, int *, const void *, int);
 extern char *elfcore_write_arm_vfp
   (bfd *, char *, int *, const void *, int);
 extern char *elfcore_write_lwpstatus
index dc6a9bb7213dc51f82e24044f96e3a74e7780c9d..f1e4882530d1ffb6944f175b94b90336abad0d2c 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -7982,6 +7982,18 @@ elfcore_grok_s390_prefix (bfd *abfd, Elf_Internal_Note *note)
   return elfcore_make_note_pseudosection (abfd, ".reg-s390-prefix", note);
 }
 
+static bfd_boolean
+elfcore_grok_s390_last_break (bfd *abfd, Elf_Internal_Note *note)
+{
+  return elfcore_make_note_pseudosection (abfd, ".reg-s390-last-break", note);
+}
+
+static bfd_boolean
+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_arm_vfp (bfd *abfd, Elf_Internal_Note *note)
 {
@@ -8407,6 +8419,20 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
       else
         return TRUE;
 
+    case NT_S390_LAST_BREAK:
+      if (note->namesz == 6
+          && strcmp (note->namedata, "LINUX") == 0)
+        return elfcore_grok_s390_last_break (abfd, note);
+      else
+        return TRUE;
+
+    case NT_S390_SYSTEM_CALL:
+      if (note->namesz == 6
+          && strcmp (note->namedata, "LINUX") == 0)
+        return elfcore_grok_s390_system_call (abfd, note);
+      else
+        return TRUE;
+
     case NT_ARM_VFP:
       if (note->namesz == 6
          && strcmp (note->namedata, "LINUX") == 0)
@@ -9167,6 +9193,32 @@ elfcore_write_s390_prefix (bfd *abfd,
                              note_name, NT_S390_PREFIX, s390_prefix, size);
 }
 
+char *
+elfcore_write_s390_last_break (bfd *abfd,
+                              char *buf,
+                              int *bufsiz,
+                              const void *s390_last_break,
+                              int size)
+{
+  char *note_name = "LINUX";
+  return elfcore_write_note (abfd, buf, bufsiz,
+                             note_name, NT_S390_LAST_BREAK,
+                            s390_last_break, size);
+}
+
+char *
+elfcore_write_s390_system_call (bfd *abfd,
+                               char *buf,
+                               int *bufsiz,
+                               const void *s390_system_call,
+                               int size)
+{
+  char *note_name = "LINUX";
+  return elfcore_write_note (abfd, buf, bufsiz,
+                             note_name, NT_S390_SYSTEM_CALL,
+                            s390_system_call, size);
+}
+
 char *
 elfcore_write_arm_vfp (bfd *abfd,
                       char *buf,
@@ -9209,6 +9261,10 @@ elfcore_write_register_note (bfd *abfd,
     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);
+  if (strcmp (section, ".reg-s390-last-break") == 0)
+    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-arm-vfp") == 0)
     return elfcore_write_arm_vfp (abfd, buf, bufsiz, data, size);
   return NULL;
index c0d38b38e12e646ddbfcebbcb8cc816222b78d56..4da18207db362591edda290a509534b5c062bfad 100644 (file)
@@ -1,3 +1,8 @@
+2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * common.h (NT_S390_LAST_BREAK): Define.
+       (NT_S390_SYSTEM_CALL): Likewise.
+
 2011-11-01  DJ Delorie  <dj@redhat.com>
 
        * common.h (EM_RL78, EM_78K0R): New.
index 4f20569ec020cf42e45c99c8632467dd559e07e1..5cddc0bef3072f4b3ff62f73a105449aa335897b 100644 (file)
                                        /*   note name must be "LINUX".  */
 #define NT_S390_PREFIX 0x305           /* S390 prefix register */
                                        /*   note name must be "LINUX".  */
+#define NT_S390_LAST_BREAK      0x306   /* S390 breaking event address */
+                                       /*   note name must be "LINUX".  */
+#define NT_S390_SYSTEM_CALL     0x307   /* S390 system call restart data */
+                                       /*   note name must be "LINUX".  */
 #define NT_ARM_VFP     0x400           /* ARM VFP registers */
                                        /*   note name must be "LINUX".  */