diff mbox

[v4,2/7] Add a psuedosection for the NT_FREEBSD_THRMISC note.

Message ID 1453142254-20266-3-git-send-email-jhb@FreeBSD.org
State New
Headers show

Commit Message

John Baldwin Jan. 18, 2016, 6:37 p.m. UTC
bfd/ChangeLog:

	* elf.c (elfcore_grok_note): Recognize NT_FREEBSD_THRMISC notes.
---
 bfd/ChangeLog | 4 ++++
 bfd/elf.c     | 7 +++++++
 2 files changed, 11 insertions(+)

Comments

Pedro Alves Jan. 19, 2016, 10:39 a.m. UTC | #1
Typo in $subject.  :-)

Thanks,
Pedro Alves
John Baldwin Jan. 19, 2016, 4:02 p.m. UTC | #2
On Tuesday, January 19, 2016 10:39:00 AM Pedro Alves wrote:
> Typo in $subject.  :-)

Ugh, I edited the commit to specifically fix that.  Not sure how it was
still broken, but I've fixed it for real.
diff mbox

Patch

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index b6a7c5f..d157d3e 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@ 
+2016-01-16  John Baldwin  <jhb@FreeBSD.org>
+
+	* elf.c (elfcore_grok_note): Recognize NT_FREEBSD_THRMISC notes.
+
 2016-01-12  Yury Usishchev  <y.usishchev@samsung.com>
 
 	* elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind
diff --git a/bfd/elf.c b/bfd/elf.c
index a1f857a..b2a50bf 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -9287,6 +9287,13 @@  elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
     case NT_SIGINFO:
       return elfcore_make_note_pseudosection (abfd, ".note.linuxcore.siginfo",
 					      note);
+
+    case NT_FREEBSD_THRMISC:
+      if (note->namesz == 8
+	  && strcmp (note->namedata, "FreeBSD") == 0)
+	return elfcore_make_note_pseudosection (abfd, ".thrmisc", note);
+      else
+	return TRUE;
     }
 }