$OpenBSD: patch-bfd_elf_c,v 1.9 2016/10/09 11:39:20 pascal Exp $
--- bfd/elf.c.orig	Fri Oct  7 19:09:21 2016
+++ bfd/elf.c	Fri Oct  7 20:53:14 2016
@@ -9866,6 +9866,11 @@ elfcore_grok_openbsd_procinfo (bfd *abfd, Elf_Internal
 static bfd_boolean
 elfcore_grok_openbsd_note (bfd *abfd, Elf_Internal_Note *note)
 {
+  int lwp;
+
+  if (elfcore_netbsd_get_lwpid (note, &lwp))
+    elf_tdata (abfd)->core->lwpid = lwp;
+
   if (note->type == NT_OPENBSD_PROCINFO)
     return elfcore_grok_openbsd_procinfo (abfd, note);
 
