/* readelf.c -- display contents of an ELF format file
- Copyright (C) 1998-2015 Free Software Foundation, Inc.
+ Copyright (C) 1998-2016 Free Software Foundation, Inc.
Originally developed by Eric Youngdale <eric@andante.jic.com>
Modifications by Nick Clifton <nickc@redhat.com>
case EF_ARC_CPU_ARCV2HS:
strcat (buf, ", ARC HS");
break;
+ case EF_ARC_CPU_GENERIC:
+ strcat (buf, ", ARC generic");
+ break;
+ case E_ARC_MACH_ARC600:
+ strcat (buf, ", ARC600");
+ break;
+ case E_ARC_MACH_ARC601:
+ strcat (buf, ", ARC601");
+ break;
+ case E_ARC_MACH_ARC700:
+ strcat (buf, ", ARC700");
+ break;
default:
- strcat (buf, ", unrecognized flag for ARCv2");
+ strcat (buf, ", unrecognized cpu flag for ARCv2");
break;
}
switch (e_flags & EF_ARC_OSABI_MSK)
{
- /* Only upstream 3.9+ kernels will support ARCv2
- ISA. */
+ case E_ARC_OSABI_ORIG:
+ strcat (buf, ", (ABI:legacy)");
+ break;
+ case E_ARC_OSABI_V2:
+ strcat (buf, ", (ABI:v2)");
+ break;
+ /* Only upstream 3.9+ kernels will support ARCv2 ISA. */
case E_ARC_OSABI_V3:
strcat (buf, ", v3 no-legacy-syscalls ABI");
break;
+ default:
+ strcat (buf, ", unrecognised ARC OSABI flag");
+ break;
}
break;
if (e_flags & E_FLAG_RX_SINSNS_SET)
strcat (buf, e_flags & E_FLAG_RX_SINSNS_YES
? ", uses String instructions" : ", bans String instructions");
+ if (e_flags & E_FLAG_RX_V2)
+ strcat (buf, ", V2");
break;
case EM_S390:
/* 18 */ { STRING_COMMA_LEN ("EXCLUDE") },
/* SPARC specific. */
/* 19 */ { STRING_COMMA_LEN ("ORDERED") },
- /* 20 */ { STRING_COMMA_LEN ("COMPRESSED") }
+ /* 20 */ { STRING_COMMA_LEN ("COMPRESSED") },
+ /* ARM specific. */
+ /* 21 */ { STRING_COMMA_LEN ("ENTRYSECT") },
+ /* 22 */ { STRING_COMMA_LEN ("ARM_NOREAD") },
+ /* 23 */ { STRING_COMMA_LEN ("COMDEF") }
};
if (do_section_details)
if (flag == SHF_ORDERED)
sindex = 19;
break;
+
+ case EM_ARM:
+ switch (flag)
+ {
+ case SHF_ENTRYSECT: sindex = 21; break;
+ case SHF_ARM_NOREAD: sindex = 22; break;
+ case SHF_COMDEF: sindex = 23; break;
+ default: break;
+ }
+ break;
+
default:
break;
}
|| elf_header.e_machine == EM_K1OM)
&& flag == SHF_X86_64_LARGE)
*p = 'l';
+ else if (elf_header.e_machine == EM_ARM
+ && flag == SHF_ARM_NOREAD)
+ *p = 'y';
else if (flag & SHF_MASKOS)
{
*p = 'o';
printf (_("Key to Flags:\n\
W (write), A (alloc), X (execute), M (merge), S (strings), l (large)\n\
I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)\n\
+ O (extra OS processing required) o (OS specific), p (processor specific)\n"));
+ else if (elf_header.e_machine == EM_ARM)
+ printf (_("Key to Flags:\n\
+ W (write), A (alloc), X (execute), M (merge), S (strings), y (noread)\n\
+ I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)\n\
O (extra OS processing required) o (OS specific), p (processor specific)\n"));
else
printf (_("Key to Flags:\n\
return reloc_type == 3; /* R_M32C_32. */
case EM_M32R:
return reloc_type == 34; /* R_M32R_32_RELA. */
+ case EM_68HC11:
+ case EM_68HC12:
+ return reloc_type == 6; /* R_M68HC11_32. */
case EM_MCORE:
return reloc_type == 1; /* R_MCORE_ADDR32. */
case EM_CYGNUS_MEP:
static const char * arm_attr_tag_CPU_arch[] =
{"Pre-v4", "v4", "v4T", "v5T", "v5TE", "v5TEJ", "v6", "v6KZ", "v6T2",
- "v6K", "v7", "v6-M", "v6S-M", "v7E-M", "v8"};
+ "v6K", "v7", "v6-M", "v6S-M", "v7E-M", "v8", "", "v8-M.baseline",
+ "v8-M.mainline"};
static const char * arm_attr_tag_ARM_ISA_use[] = {"No", "Yes"};
static const char * arm_attr_tag_THUMB_ISA_use[] =
- {"No", "Thumb-1", "Thumb-2"};
+ {"No", "Thumb-1", "Thumb-2", "Yes"};
static const char * arm_attr_tag_FP_arch[] =
{"No", "VFPv1", "VFPv2", "VFPv3", "VFPv3-D16", "VFPv4", "VFPv4-D16",
"FP for ARMv8", "FPv5/FP-D16 for ARMv8"};
return 1;
}
+static const char *
+get_freebsd_elfcore_note_type (unsigned e_type)
+{
+ switch (e_type)
+ {
+ case NT_FREEBSD_THRMISC:
+ return _("NT_THRMISC (thrmisc structure)");
+ case NT_FREEBSD_PROCSTAT_PROC:
+ return _("NT_PROCSTAT_PROC (proc data)");
+ case NT_FREEBSD_PROCSTAT_FILES:
+ return _("NT_PROCSTAT_FILES (files data)");
+ case NT_FREEBSD_PROCSTAT_VMMAP:
+ return _("NT_PROCSTAT_VMMAP (vmmap data)");
+ case NT_FREEBSD_PROCSTAT_GROUPS:
+ return _("NT_PROCSTAT_GROUPS (groups data)");
+ case NT_FREEBSD_PROCSTAT_UMASK:
+ return _("NT_PROCSTAT_UMASK (umask data)");
+ case NT_FREEBSD_PROCSTAT_RLIMIT:
+ return _("NT_PROCSTAT_RLIMIT (rlimit data)");
+ case NT_FREEBSD_PROCSTAT_OSREL:
+ return _("NT_PROCSTAT_OSREL (osreldate data)");
+ case NT_FREEBSD_PROCSTAT_PSSTRINGS:
+ return _("NT_PROCSTAT_PSSTRINGS (ps_strings data)");
+ case NT_FREEBSD_PROCSTAT_AUXV:
+ return _("NT_PROCSTAT_AUXV (auxv data)");
+ }
+ return get_note_type (e_type);
+}
+
static const char *
get_netbsd_elfcore_note_type (unsigned e_type)
{
/* GNU-specific object file notes. */
nt = get_gnu_elf_note_type (pnote->type);
+ else if (const_strneq (pnote->namedata, "FreeBSD"))
+ /* FreeBSD-specific core file notes. */
+ nt = get_freebsd_elfcore_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);