Implement NT_NETBSDCORE_LWPSTATUS (NetBSD-Core)
authorKamil Rytarowski <n54@gmx.com>
Fri, 13 Mar 2020 22:37:10 +0000 (23:37 +0100)
committerKamil Rytarowski <n54@gmx.com>
Fri, 13 Mar 2020 23:31:16 +0000 (00:31 +0100)
bfd/ChangeLog:

* elf.c (elfcore_grok_netbsd_note): Add support for
NT_NETBSDCORE_LWPSTATUS notes.

binutils/ChangeLog:

* readelf.c (get_netbsd_elfcore_note_type): Add support for
NT_NETBSDCORE_LWPSTATUS notes.

include/ChangeLog:

* elf/common.h (NT_NETBSDCORE_LWPSTATUS): New define.

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

index 84bc1e116ba74d2f76fb16329a8a072a67007532..23d539c51b5e37d138e4019e6b7fd6b752652edc 100644 (file)
@@ -1,3 +1,8 @@
+2020-03-13  Kamil Rytarowski  <n54@gmx.com>
+
+       * elf.c (elfcore_grok_netbsd_note): Add support for
+       NT_NETBSDCORE_LWPSTATUS notes.
+
 2020-03-13  Christophe Lyon  <christophe.lyon@linaro.org>
 
        * bfd-in2.h: Regenerate.
index 1926ecc80375bc31ec7a5943d2f19fd44f668a23..c8241cc5799a35aa7e8ba3f3563607798a8aceb3 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -10749,12 +10749,18 @@ elfcore_grok_netbsd_note (bfd *abfd, Elf_Internal_Note *note)
     case NT_NETBSDCORE_AUXV:
       /* NetBSD-specific Elf Auxiliary Vector data. */
       return elfcore_make_auxv_note_section (abfd, note, 4);
+#endif
+#ifdef NT_NETBSDCORE_LWPSTATUS
+    case NT_NETBSDCORE_LWPSTATUS:
+      return elfcore_make_note_pseudosection (abfd,
+                                             ".note.netbsdcore.lwpstatus",
+                                             note);
 #endif
     default:
       break;
     }
 
-  /* As of March 2017 there are no other machine-independent notes
+  /* As of March 2020 there are no other machine-independent notes
      defined for NetBSD core files.  If the note type is less
      than the start of the machine-dependent note types, we don't
      understand it.  */
index cafd0762a651ee76dba1a93b082fdf02f45a56aa..d88ec4dacb2778d69def10a5971d880bfd099285 100644 (file)
@@ -1,3 +1,8 @@
+2020-03-13  Kamil Rytarowski  <n54@gmx.com>
+
+       * readelf.c (get_netbsd_elfcore_note_type): Add support for
+       NT_NETBSDCORE_LWPSTATUS notes.
+
 2020-03-13  Alan Modra  <amodra@gmail.com>
 
        * elfcomm.c (get_archive_member_name): Always return malloc'd
index 4e21bdb56c9125e4940cb0baa6d244560aa2cab5..f36883cb645a736ecdf7a17ec572380e5e51aef2 100644 (file)
@@ -18451,8 +18451,13 @@ get_netbsd_elfcore_note_type (Filedata * filedata, unsigned e_type)
       return _("NetBSD ELF auxiliary vector data");
 #endif
 
+#ifdef NT_NETBSDCORE_LWPSTATUS
+    case NT_NETBSDCORE_LWPSTATUS:
+      return _("PT_LWPSTATUS (ptrace_lwpstatus structure)");
+#endif
+
     default:
-      /* As of Jan 2002 there are no other machine-independent notes
+      /* As of Jan 2020 there are no other machine-independent notes
         defined for NetBSD core files.  If the note type is less
         than the start of the machine-dependent note types, we don't
         understand it.  */
index f0934c984ca8363dc9e2f59e9c455f3ab7f1abef..c19d4d4881c802ec105ad838e267e564e67bc2ba 100644 (file)
@@ -1,4 +1,8 @@
-2020-03-13  Kamil Rytarowski  <n54@gmx.de>
+2020-03-13  Kamil Rytarowski  <n54@gmx.com>
+
+       * elf/common.h (NT_NETBSDCORE_LWPSTATUS): New define.
+
+2020-03-13  Kamil Rytarowski  <n54@gmx.com>
 
        * elf/common.h (NT_NETBSDCORE_AUXV): New define.
 
index 755c791ad69a3c0e3bff124c209853ead9f62404..1c84ccb430e65cb00276865f1b89a711af08305f 100644 (file)
 
 #define NT_NETBSDCORE_PROCINFO 1       /* Has a struct procinfo */
 #define NT_NETBSDCORE_AUXV     2       /* Has auxv data */
+#define NT_NETBSDCORE_LWPSTATUS        24      /* Has LWPSTATUS data */
 #define NT_NETBSDCORE_FIRSTMACH        32      /* start of machdep note types */
 
 
This page took 0.037781 seconds and 4 git commands to generate.