aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2016-06-12 12:34:51 -0700
committerJohn Baldwin <jhb@FreeBSD.org>2016-06-24 10:33:51 -0700
commit3350c5f5de3d2e62dd9de2a76cf2d5d8728d2600 (patch)
treedad8f75e3a2e339eb5469a05823b168d710d6618 /bfd
parent7697fc9ec3a970f05abb836107653c46ada466ad (diff)
downloadgdb-3350c5f5de3d2e62dd9de2a76cf2d5d8728d2600.zip
gdb-3350c5f5de3d2e62dd9de2a76cf2d5d8728d2600.tar.gz
gdb-3350c5f5de3d2e62dd9de2a76cf2d5d8728d2600.tar.bz2
Create a pseudo section for the ELF AUXV core dump note on FreeBSD.
The procstat AUXV core dump note in FreeBSD consists of 32-bit integer followed by an array of auxiliary vector entries. bfd/ChangeLog: * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PROCSTAT_AUXV notes.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf.c14
2 files changed, 19 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 4822e30..2cf8b27 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
2016-06-24 John Baldwin <jhb@FreeBSD.org>
+ * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PROCSTAT_AUXV
+ notes.
+
+2016-06-24 John Baldwin <jhb@FreeBSD.org>
+
* elf.c (elfcore_grok_note): Remove handling of NT_X86_XSTATE for
FreeBSD. Remove case for NT_FREEBSD_THRMISC.
(elfcore_grok_freebsd_psinfo): New function.
diff --git a/bfd/elf.c b/bfd/elf.c
index cfcafaa..cb4de50 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -9663,6 +9663,20 @@ elfcore_grok_freebsd_note (bfd *abfd, Elf_Internal_Note *note)
else
return TRUE;
+ case NT_FREEBSD_PROCSTAT_AUXV:
+ {
+ asection *sect = bfd_make_section_anyway_with_flags (abfd, ".auxv",
+ SEC_HAS_CONTENTS);
+
+ if (sect == NULL)
+ return FALSE;
+ sect->size = note->descsz - 4;
+ sect->filepos = note->descpos + 4;
+ sect->alignment_power = 1 + bfd_get_arch_size (abfd) / 32;
+
+ return TRUE;
+ }
+
case NT_X86_XSTATE:
if (note->namesz == 8)
return elfcore_grok_xstatereg (abfd, note);