include/elf/
authorUlrich Weigand <uweigand@de.ibm.com>
Wed, 15 Jun 2011 16:36:58 +0000 (16:36 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Wed, 15 Jun 2011 16:36:58 +0000 (16:36 +0000)
* common.h (NT_ARM_VFP): Define.

bfd/
* elf-bfd.h (elfcore_write_arm_vfp): Add prototype.
* elf.c (elfcore_grok_arm_vfp): New function.
(elfcore_grok_note): Call it to handle NT_ARM_VFP notes.
(elfcore_write_arm_vfp): New function.
(elfcore_write_register_note): Call it to handle .reg-arm-vfp.

binutils/
* readelf.c (get_note_type): Handle NT_ARM_VFP.

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

index abe9f72f8277ddbe231302152cf595770174b7b2..2489eda2de96d3c97a71e614707e0581a26fcad3 100644 (file)
@@ -1,3 +1,11 @@
+2011-06-15  Ulrich Weigand  <ulrich.weigand@linaro.org>
+
+       * elf-bfd.h (elfcore_write_arm_vfp): Add prototype.
+       * elf.c (elfcore_grok_arm_vfp): New function.
+       (elfcore_grok_note): Call it to handle NT_ARM_VFP notes.
+       (elfcore_write_arm_vfp): New function.
+       (elfcore_write_register_note): Call it to handle .reg-arm-vfp.
+
 2011-06-14  Richard Henderson  <rth@redhat.com>
 
        * elf64-alpha.c (elf64_alpha_copy_indirect_symbol): Rename from
index f2d73ac049983efd4fb432e32c8a6c1b34b40f73..64a9dc0e40e6f4e7fe81bd113538943c92dcfff8 100644 (file)
@@ -2225,6 +2225,8 @@ 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_arm_vfp
+  (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 4664c583b717acfde76d370dcdb785404f6b23a8..15e0cd34f69eba57734d9c6549b94402d99d66ee 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -7976,6 +7976,12 @@ 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_arm_vfp (bfd *abfd, Elf_Internal_Note *note)
+{
+  return elfcore_make_note_pseudosection (abfd, ".reg-arm-vfp", note);
+}
+
 #if defined (HAVE_PRPSINFO_T)
 typedef prpsinfo_t   elfcore_psinfo_t;
 #if defined (HAVE_PRPSINFO32_T)                /* Sparc64 cross Sparc32 */
@@ -8395,6 +8401,13 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
       else
         return TRUE;
 
+    case NT_ARM_VFP:
+      if (note->namesz == 6
+         && strcmp (note->namedata, "LINUX") == 0)
+       return elfcore_grok_arm_vfp (abfd, note);
+      else
+       return TRUE;
+
     case NT_PRPSINFO:
     case NT_PSINFO:
       if (bed->elf_backend_grok_psinfo)
@@ -9148,6 +9161,18 @@ elfcore_write_s390_prefix (bfd *abfd,
                              note_name, NT_S390_PREFIX, s390_prefix, size);
 }
 
+char *
+elfcore_write_arm_vfp (bfd *abfd,
+                      char *buf,
+                      int *bufsiz,
+                      const void *arm_vfp,
+                      int size)
+{
+  char *note_name = "LINUX";
+  return elfcore_write_note (abfd, buf, bufsiz,
+                            note_name, NT_ARM_VFP, arm_vfp, size);
+}
+
 char *
 elfcore_write_register_note (bfd *abfd,
                             char *buf,
@@ -9178,6 +9203,8 @@ 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-arm-vfp") == 0)
+    return elfcore_write_arm_vfp (abfd, buf, bufsiz, data, size);
   return NULL;
 }
 
index 320bd7f784b7f2699ee5d8e7a53fd83564f5dd3a..82d6b52302ba103f991cf8d2c9cc73bfbff718dc 100644 (file)
@@ -1,3 +1,7 @@
+2011-06-15  Ulrich Weigand  <ulrich.weigand@linaro.org>
+
+       * readelf.c (get_note_type): Handle NT_ARM_VFP.
+
 2011-06-13  Walter Lee  <walt@tilera.com>
 
        * readelf.c: Include tilepro.h and tilegx.h.
index 2724a9a2633f450bc69420ee0c776d0a79670b3f..5a6521c54f9bed77e7b81a9d90dde854387b1114 100644 (file)
@@ -12284,6 +12284,8 @@ get_note_type (unsigned e_type)
        return _("NT_S390_CTRS (s390 control registers)");
       case NT_S390_PREFIX:
        return _("NT_S390_PREFIX (s390 prefix register)");
+      case NT_ARM_VFP:
+       return _("NT_ARM_VFP (arm VFP registers)");
       case NT_PSTATUS:
        return _("NT_PSTATUS (pstatus structure)");
       case NT_FPREGS:
index 0147d5a2761891bdef15aa64c17077d9c685f1be..76fa7e5e1f43241d131c2045a5b497de61a3532e 100644 (file)
@@ -1,3 +1,7 @@
+2011-06-15  Ulrich Weigand  <ulrich.weigand@linaro.org>
+
+       * common.h (NT_ARM_VFP): Define.
+
 2011-06-13  Walter Lee  <walt@tilera.com>
 
        * common.h: Add EM_TILEGX.
index 7f545317de129fed01a8b0be8786727377d6a81c..70088a09bc1e4307b3a565afc0e9e8de081131a8 100644 (file)
                                        /*   note name must be "LINUX".  */
 #define NT_S390_PREFIX 0x305           /* S390 prefix register */
                                        /*   note name must be "LINUX".  */
+#define NT_ARM_VFP     0x400           /* ARM VFP registers */
+                                       /*   note name must be "LINUX".  */
 
 /* Note segments for core files on dir-style procfs systems.  */