aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf.c9
2 files changed, 14 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 729630d..55c37f0 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2015-04-13 John Baldwin <jhb@FreeBSD.org>
+
+ * elf.c (elfcore_grok_note): Recognize NT_X86_XSTATE on
+ FreeBSD.
+ (elfcore_write_xstatereg): Use correct note name on FreeBSD.
+
2015-04-13 H.J. Lu <hongjiu.lu@intel.com>
PR ld/18250
diff --git a/bfd/elf.c b/bfd/elf.c
index a031b9e..41fb023 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -8737,6 +8737,9 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
if (note->namesz == 6
&& strcmp (note->namedata, "LINUX") == 0)
return elfcore_grok_xstatereg (abfd, note);
+ else if (note->namesz == 8
+ && strcmp (note->namedata, "FreeBSD") == 0)
+ return elfcore_grok_xstatereg (abfd, note);
else
return TRUE;
@@ -9556,7 +9559,11 @@ char *
elfcore_write_xstatereg (bfd *abfd, char *buf, int *bufsiz,
const void *xfpregs, int size)
{
- char *note_name = "LINUX";
+ char *note_name;
+ if (get_elf_backend_data (abfd)->elf_osabi == ELFOSABI_FREEBSD)
+ note_name = "FreeBSD";
+ else
+ note_name = "LINUX";
return elfcore_write_note (abfd, buf, bufsiz,
note_name, NT_X86_XSTATE, xfpregs, size);
}