Read and load the aux vector from a core file

This commit is contained in:
christos 2016-05-24 00:50:53 +00:00
parent 9d95ecedc7
commit 2a2068fd64
2 changed files with 15 additions and 0 deletions

View File

@ -9241,6 +9241,20 @@ elfcore_grok_netbsd_note (bfd *abfd, Elf_Internal_Note *note)
return elfcore_grok_netbsd_procinfo (abfd, note);
}
if (note->type == NT_NETBSDCORE_AUXV)
{
asection *sect = bfd_make_section_anyway_with_flags (abfd, ".auxv",
SEC_HAS_CONTENTS);
if (sect == NULL)
return FALSE;
sect->size = note->descsz;
sect->filepos = note->descpos;
sect->alignment_power = 1 + bfd_get_arch_size (abfd) / 32;
return TRUE;
}
/* As of Jan 2002 there are no other machine-independent notes
defined for NetBSD core files. If the note type is less
than the start of the machine-dependent note types, we don't

View File

@ -598,6 +598,7 @@
must start with "NetBSD-CORE". */
#define NT_NETBSDCORE_PROCINFO 1 /* Has a struct procinfo */
#define NT_NETBSDCORE_AUXV 2 /* Has a copy of Elfxx_auxv_t */
#define NT_NETBSDCORE_FIRSTMACH 32 /* start of machdep note types */