2007-07-09 Roland McGrath <roland@redhat.com>

* readelf.c (get_gnu_elf_note_type): New function.
	(process_note): Use it for "GNU" name.
This commit is contained in:
Roland McGrath 2007-07-09 21:19:51 +00:00
parent 1d81b01501
commit 1118d2524e

View File

@ -9127,6 +9127,27 @@ get_note_type (unsigned e_type)
return buff;
}
static const char *
get_gnu_elf_note_type (unsigned e_type)
{
static char buff[64];
switch (e_type)
{
case NT_GNU_ABI_TAG:
return _("NT_GNU_ABI_TAG (ABI version tag)");
case NT_GNU_HWCAP:
return _("NT_GNU_HWCAP (DSO-supplied software HWCAP info)");
case NT_GNU_BUILD_ID:
return _("NT_GNU_BUILD_ID (unique build ID bitstring)");
default:
break;
}
snprintf (buff, sizeof (buff), _("Unknown note type: (0x%08x)"), e_type);
return buff;
}
static const char *
get_netbsd_elfcore_note_type (unsigned e_type)
{
@ -9204,6 +9225,10 @@ process_note (Elf_Internal_Note *pnote)
note type strings. */
nt = get_note_type (pnote->type);
else if (const_strneq (pnote->namedata, "GNU"))
/* GNU-specific object file notes. */
nt = get_gnu_elf_note_type (pnote->type);
else if (const_strneq (pnote->namedata, "NetBSD-CORE"))
/* NetBSD-specific core file notes. */
nt = get_netbsd_elfcore_note_type (pnote->type);