Create a pseudo section for the ELF AUXV core dump note on FreeBSD.
authorJohn Baldwin <jhb@FreeBSD.org>
Sun, 12 Jun 2016 19:34:51 +0000 (12:34 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Fri, 24 Jun 2016 17:33:51 +0000 (10:33 -0700)
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.

bfd/ChangeLog
bfd/elf.c

index 4822e30124697fa6087ac3e6c1ad1b5f0ad4d81a..2cf8b27e9da5e87ddbc7a5c503af3903f09e7860 100644 (file)
@@ -1,3 +1,8 @@
+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
index cfcafaad90e6fb6fa78c2ae55d1f690486b7e2fe..cb4de50ac9ae6723488cbdfbc4343b33d7c96727 100644 (file)
--- 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);
This page took 0.034009 seconds and 4 git commands to generate.