include/elf/
authorYufeng Zhang <yufeng.zhang@arm.com>
Tue, 8 Jan 2013 18:09:12 +0000 (18:09 +0000)
committerYufeng Zhang <yufeng.zhang@arm.com>
Tue, 8 Jan 2013 18:09:12 +0000 (18:09 +0000)
2013-01-08  Yufeng Zhang  <yufeng.zhang@arm.com>

* common.h (NT_ARM_TLS, NT_ARM_HW_BREAK, NT_ARM_HW_WATCH): New macro
definitions.

bfd/

2013-01-08  Yufeng Zhang  <yufeng.zhang@arm.com>

* elf-bfd.h (elfcore_write_aarch_tls): Add prototype.
(elfcore_write_aarch_hw_break): Likewise.
(elfcore_write_aarch_hw_watch): Likewise.
* elf.c (elfcore_grok_aarch_tls): New function.
(elfcore_grok_aarch_hw_break): Likewise.
(elfcore_grok_aarch_hw_watch): Likewise.
(elfcore_grok_note): Call the new functions to handle the
corresponding notes.
(elfcore_write_aarch_tls): New function.
(elfcore_write_aarch_hw_break): Likewise.
(elfcore_write_aarch_hw_watch): Likewise.
(elfcore_write_register_note): Call the new functions to handle the
corresponding pseudo sections.

binutils/

2013-01-08  Yufeng Zhang  <yufeng.zhang@arm.com>

* readelf.c (get_note_type): Handle NT_ARM_TLS, NT_ARM_HW_BREAK
and NT_ARM_HW_WATCH.

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

index 053dde3de8185ae6ca90f7f9567e2ed9476f07b4..7abc2683d998e78b63d6c6079b417ee8b97b9c3c 100644 (file)
@@ -1,3 +1,19 @@
+2013-01-08  Yufeng Zhang  <yufeng.zhang@arm.com>
+
+       * elf-bfd.h (elfcore_write_aarch_tls): Add prototype.
+       (elfcore_write_aarch_hw_break): Likewise.
+       (elfcore_write_aarch_hw_watch): Likewise.
+       * elf.c (elfcore_grok_aarch_tls): New function.
+       (elfcore_grok_aarch_hw_break): Likewise.
+       (elfcore_grok_aarch_hw_watch): Likewise.
+       (elfcore_grok_note): Call the new functions to handle the
+       corresponding notes.
+       (elfcore_write_aarch_tls): New function.
+       (elfcore_write_aarch_hw_break): Likewise.
+       (elfcore_write_aarch_hw_watch): Likewise.
+       (elfcore_write_register_note): Call the new functions to handle the
+       corresponding pseudo sections.
+
 2013-01-07  Tom Tromey  <tromey@redhat.com>
 
        * section.c (_bfd_std_section): Rename from std_section.
 2013-01-07  Tom Tromey  <tromey@redhat.com>
 
        * section.c (_bfd_std_section): Rename from std_section.
index b8d82b1b7f9b96aacf6c714f41b7249166989fd6..533c5d46bbe887005a882c1d37a06eb84e26185c 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end data structures for ELF files.
    Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
 /* BFD back-end data structures for ELF files.
    Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -2269,6 +2269,12 @@ 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);
   (bfd *, char *, int *, const void *, int);
 extern char *elfcore_write_arm_vfp
   (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_aarch_tls
+  (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_aarch_hw_break
+  (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_aarch_hw_watch
+  (bfd *, char *, int *, const void *, int);
 extern char *elfcore_write_lwpstatus
   (bfd *, char *, int *, long, int, const void *);
 extern char *elfcore_write_register_note
 extern char *elfcore_write_lwpstatus
   (bfd *, char *, int *, long, int, const void *);
 extern char *elfcore_write_register_note
index 17e9ad47dd06b94cc7050c7aee1c06baa62891b3..9cd3542f5688c603684dd95b25480f3c7ff5f8ef 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1,7 +1,8 @@
 /* ELF executable support for BFD.
 
    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
 /* 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
+   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
+   2013
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -8162,6 +8163,24 @@ elfcore_grok_arm_vfp (bfd *abfd, Elf_Internal_Note *note)
   return elfcore_make_note_pseudosection (abfd, ".reg-arm-vfp", note);
 }
 
   return elfcore_make_note_pseudosection (abfd, ".reg-arm-vfp", note);
 }
 
+static bfd_boolean
+elfcore_grok_aarch_tls (bfd *abfd, Elf_Internal_Note *note)
+{
+  return elfcore_make_note_pseudosection (abfd, ".reg-aarch-tls", note);
+}
+
+static bfd_boolean
+elfcore_grok_aarch_hw_break (bfd *abfd, Elf_Internal_Note *note)
+{
+  return elfcore_make_note_pseudosection (abfd, ".reg-aarch-hw-break", note);
+}
+
+static bfd_boolean
+elfcore_grok_aarch_hw_watch (bfd *abfd, Elf_Internal_Note *note)
+{
+  return elfcore_make_note_pseudosection (abfd, ".reg-aarch-hw-watch", note);
+}
+
 #if defined (HAVE_PRPSINFO_T)
 typedef prpsinfo_t   elfcore_psinfo_t;
 #if defined (HAVE_PRPSINFO32_T)                /* Sparc64 cross Sparc32 */
 #if defined (HAVE_PRPSINFO_T)
 typedef prpsinfo_t   elfcore_psinfo_t;
 #if defined (HAVE_PRPSINFO32_T)                /* Sparc64 cross Sparc32 */
@@ -8602,6 +8621,27 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
       else
        return TRUE;
 
       else
        return TRUE;
 
+    case NT_ARM_TLS:
+      if (note->namesz == 6
+         && strcmp (note->namedata, "LINUX") == 0)
+       return elfcore_grok_aarch_tls (abfd, note);
+      else
+       return TRUE;
+
+    case NT_ARM_HW_BREAK:
+      if (note->namesz == 6
+         && strcmp (note->namedata, "LINUX") == 0)
+       return elfcore_grok_aarch_hw_break (abfd, note);
+      else
+       return TRUE;
+
+    case NT_ARM_HW_WATCH:
+      if (note->namesz == 6
+         && strcmp (note->namedata, "LINUX") == 0)
+       return elfcore_grok_aarch_hw_watch (abfd, note);
+      else
+       return TRUE;
+
     case NT_PRPSINFO:
     case NT_PSINFO:
       if (bed->elf_backend_grok_psinfo)
     case NT_PRPSINFO:
     case NT_PSINFO:
       if (bed->elf_backend_grok_psinfo)
@@ -9405,6 +9445,42 @@ elfcore_write_arm_vfp (bfd *abfd,
                             note_name, NT_ARM_VFP, arm_vfp, size);
 }
 
                             note_name, NT_ARM_VFP, arm_vfp, size);
 }
 
+char *
+elfcore_write_aarch_tls (bfd *abfd,
+                      char *buf,
+                      int *bufsiz,
+                      const void *aarch_tls,
+                      int size)
+{
+  char *note_name = "LINUX";
+  return elfcore_write_note (abfd, buf, bufsiz,
+                            note_name, NT_ARM_TLS, aarch_tls, size);
+}
+
+char *
+elfcore_write_aarch_hw_break (bfd *abfd,
+                           char *buf,
+                           int *bufsiz,
+                           const void *aarch_hw_break,
+                           int size)
+{
+  char *note_name = "LINUX";
+  return elfcore_write_note (abfd, buf, bufsiz,
+                            note_name, NT_ARM_HW_BREAK, aarch_hw_break, size);
+}
+
+char *
+elfcore_write_aarch_hw_watch (bfd *abfd,
+                           char *buf,
+                           int *bufsiz,
+                           const void *aarch_hw_watch,
+                           int size)
+{
+  char *note_name = "LINUX";
+  return elfcore_write_note (abfd, buf, bufsiz,
+                            note_name, NT_ARM_HW_WATCH, aarch_hw_watch, size);
+}
+
 char *
 elfcore_write_register_note (bfd *abfd,
                             char *buf,
 char *
 elfcore_write_register_note (bfd *abfd,
                             char *buf,
@@ -9441,6 +9517,12 @@ elfcore_write_register_note (bfd *abfd,
     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 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);
+  if (strcmp (section, ".reg-aarch-tls") == 0)
+    return elfcore_write_aarch_tls (abfd, buf, bufsiz, data, size);
+  if (strcmp (section, ".reg-aarch-hw-break") == 0)
+    return elfcore_write_aarch_hw_break (abfd, buf, bufsiz, data, size);
+  if (strcmp (section, ".reg-aarch-hw-watch") == 0)
+    return elfcore_write_aarch_hw_watch (abfd, buf, bufsiz, data, size);
   return NULL;
 }
 
   return NULL;
 }
 
index 4c279bfa4f5ec893e3319ff65766b5aa1f5d2f7f..89e427ec4cdc34b110ff47be75414578e616c356 100644 (file)
@@ -1,3 +1,8 @@
+2013-01-08  Yufeng Zhang  <yufeng.zhang@arm.com>
+
+       * readelf.c (get_note_type): Handle NT_ARM_TLS, NT_ARM_HW_BREAK
+       and NT_ARM_HW_WATCH.
+
 2013-01-07  Roland McGrath  <mcgrathr@google.com>
 
        * objcopy.c (deterministic): Make int rather than bfd_boolean,
 2013-01-07  Roland McGrath  <mcgrathr@google.com>
 
        * objcopy.c (deterministic): Make int rather than bfd_boolean,
index 78775390a05c6f92945223b670e85dc3eb95549e..690f740bd8a0433c258824ca85636fa8011f2bf5 100644 (file)
@@ -1,6 +1,6 @@
 /* readelf.c -- display contents of an ELF format file
    Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
 /* readelf.c -- display contents of an ELF format file
    Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-   2008, 2009, 2010, 2011, 2012
+   2008, 2009, 2010, 2011, 2012, 2013
    Free Software Foundation, Inc.
 
    Originally developed by Eric Youngdale <eric@andante.jic.com>
    Free Software Foundation, Inc.
 
    Originally developed by Eric Youngdale <eric@andante.jic.com>
@@ -12803,6 +12803,12 @@ get_note_type (unsigned e_type)
        return _("NT_S390_PREFIX (s390 prefix register)");
       case NT_ARM_VFP:
        return _("NT_ARM_VFP (arm VFP registers)");
        return _("NT_S390_PREFIX (s390 prefix register)");
       case NT_ARM_VFP:
        return _("NT_ARM_VFP (arm VFP registers)");
+      case NT_ARM_TLS:
+       return _("NT_ARM_TLS (AArch TLS registers)");
+      case NT_ARM_HW_BREAK:
+       return _("NT_ARM_HW_BREAK (AArch hardware breakpoint registers)");
+      case NT_ARM_HW_WATCH:
+       return _("NT_ARM_HW_WATCH (AArch hardware watchpoint registers)");
       case NT_PSTATUS:
        return _("NT_PSTATUS (pstatus structure)");
       case NT_FPREGS:
       case NT_PSTATUS:
        return _("NT_PSTATUS (pstatus structure)");
       case NT_FPREGS:
index e49c254559fc788e604955f34cb5087b85505f96..8cb1cb8a3c850bdb27ec5e5e44c4ece4e0cc8112 100644 (file)
@@ -1,3 +1,8 @@
+2013-01-08  Yufeng Zhang  <yufeng.zhang@arm.com>
+
+       * common.h (NT_ARM_TLS, NT_ARM_HW_BREAK, NT_ARM_HW_WATCH): New macro
+       definitions.
+
 2013-01-04  Juergen Urban <JuergenUrban@gmx.de>
 
        * mips.h: Add MIPS machine variant number for r5900 which is
 2013-01-04  Juergen Urban <JuergenUrban@gmx.de>
 
        * mips.h: Add MIPS machine variant number for r5900 which is
index 4399d0285e51c834de066ae0985606229772c179..ca3693506aab995e683ecf2a93f77ef2b15a5520 100644 (file)
@@ -1,6 +1,7 @@
 /* ELF support for BFD.
    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
 /* ELF support for BFD.
    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
+   2013
    Free Software Foundation, Inc.
 
    Written by Fred Fish @ Cygnus Support, from information published
    Free Software Foundation, Inc.
 
    Written by Fred Fish @ Cygnus Support, from information published
 #define NT_S390_SYSTEM_CALL     0x307   /* S390 system call restart data */
                                        /*   note name must be "LINUX".  */
 #define NT_ARM_VFP     0x400           /* ARM VFP registers */
 #define NT_S390_SYSTEM_CALL     0x307   /* S390 system call restart data */
                                        /*   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.  */
+#define NT_ARM_TLS     0x401           /* AArch TLS registers */
+                                       /*   note name must be "LINUX".  */
+#define NT_ARM_HW_BREAK        0x402           /* AArch hardware breakpoint registers */
+                                       /*   note name must be "LINUX".  */
+#define NT_ARM_HW_WATCH        0x403           /* AArch hardware watchpoint registers */
                                        /*   note name must be "LINUX".  */
 #define NT_SIGINFO     0x53494749      /* Fields of siginfo_t.  */
 #define NT_FILE                0x46494c45      /* Description of mapped files.  */
                                        /*   note name must be "LINUX".  */
 #define NT_SIGINFO     0x53494749      /* Fields of siginfo_t.  */
 #define NT_FILE                0x46494c45      /* Description of mapped files.  */
This page took 0.037679 seconds and 4 git commands to generate.