summaryrefslogtreecommitdiff
path: root/bfd/elfxx-target.h
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2017-10-06 11:41:45 -0700
committerJohn Baldwin <jhb@FreeBSD.org>2017-10-06 11:43:07 -0700
commit544c67cda1686c1b204cb96c0d7885b08d37b8d6 (patch)
tree763587ea1724ba488f88c39b9b528934b4ec46db /bfd/elfxx-target.h
parent0d28b0a5caa6b04129e21a9aff371d4032c7ef17 (diff)
downloadbinutils-gdb-544c67cda1686c1b204cb96c0d7885b08d37b8d6.tar.gz
Account for padding in FreeBSD/mipsn32 NT_PRSTATUS notes.
Add a new ELF backend method to grok FreeBSD NT_PRSTATUS core dump notes. Define a method for MIPS N32 to override the default elfcore_grok_freebsd_prstatus that accounts for additional padding between pr_pid and pr_reg that is not present in other 32-bit FreeBSD platforms. * elf-bfd.h (struct elf_backend_data): Add `elf_backend_grok_freebsd_prstatus'. * elf.c (elfcore_grok_freebsd_note): Call `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if present. * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New function. (elf_backend_grok_freebsd_prstatus): Define. * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define. (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
Diffstat (limited to 'bfd/elfxx-target.h')
-rw-r--r--bfd/elfxx-target.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h
index 551883fa094..6efca84e4e1 100644
--- a/bfd/elfxx-target.h
+++ b/bfd/elfxx-target.h
@@ -597,6 +597,9 @@
#ifndef elf_backend_grok_psinfo
#define elf_backend_grok_psinfo NULL
#endif
+#ifndef elf_backend_grok_freebsd_prstatus
+#define elf_backend_grok_freebsd_prstatus NULL
+#endif
#ifndef elf_backend_write_core_note
#define elf_backend_write_core_note NULL
#endif
@@ -820,6 +823,7 @@ static struct elf_backend_data elfNN_bed =
elf_backend_sort_relocs_p,
elf_backend_grok_prstatus,
elf_backend_grok_psinfo,
+ elf_backend_grok_freebsd_prstatus,
elf_backend_write_core_note,
elf_backend_lookup_section_flags_hook,
elf_backend_reloc_type_class,