-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"};
-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"};
-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"};
-static const char * arm_attr_tag_WMMX_arch[] = {"No", "WMMXv1", "WMMXv2"};
-static const char * arm_attr_tag_Advanced_SIMD_arch[] =
- {"No", "NEONv1", "NEONv1 with Fused-MAC", "NEON for ARMv8"};
-static const char * arm_attr_tag_PCS_config[] =
- {"None", "Bare platform", "Linux application", "Linux DSO", "PalmOS 2004",
- "PalmOS (reserved)", "SymbianOS 2004", "SymbianOS (reserved)"};
-static const char * arm_attr_tag_ABI_PCS_R9_use[] =
- {"V6", "SB", "TLS", "Unused"};
-static const char * arm_attr_tag_ABI_PCS_RW_data[] =
- {"Absolute", "PC-relative", "SB-relative", "None"};
-static const char * arm_attr_tag_ABI_PCS_RO_data[] =
- {"Absolute", "PC-relative", "None"};
-static const char * arm_attr_tag_ABI_PCS_GOT_use[] =
- {"None", "direct", "GOT-indirect"};
-static const char * arm_attr_tag_ABI_PCS_wchar_t[] =
- {"None", "??? 1", "2", "??? 3", "4"};
-static const char * arm_attr_tag_ABI_FP_rounding[] = {"Unused", "Needed"};
-static const char * arm_attr_tag_ABI_FP_denormal[] =
- {"Unused", "Needed", "Sign only"};
-static const char * arm_attr_tag_ABI_FP_exceptions[] = {"Unused", "Needed"};
-static const char * arm_attr_tag_ABI_FP_user_exceptions[] = {"Unused", "Needed"};
-static const char * arm_attr_tag_ABI_FP_number_model[] =
- {"Unused", "Finite", "RTABI", "IEEE 754"};
-static const char * arm_attr_tag_ABI_enum_size[] =
- {"Unused", "small", "int", "forced to int"};
-static const char * arm_attr_tag_ABI_HardFP_use[] =
- {"As Tag_FP_arch", "SP only", "DP only", "SP and DP"};
-static const char * arm_attr_tag_ABI_VFP_args[] =
- {"AAPCS", "VFP registers", "custom", "compatible"};
-static const char * arm_attr_tag_ABI_WMMX_args[] =
- {"AAPCS", "WMMX registers", "custom"};
-static const char * arm_attr_tag_ABI_optimization_goals[] =
- {"None", "Prefer Speed", "Aggressive Speed", "Prefer Size",
- "Aggressive Size", "Prefer Debug", "Aggressive Debug"};
-static const char * arm_attr_tag_ABI_FP_optimization_goals[] =
- {"None", "Prefer Speed", "Aggressive Speed", "Prefer Size",
- "Aggressive Size", "Prefer Accuracy", "Aggressive Accuracy"};
-static const char * arm_attr_tag_CPU_unaligned_access[] = {"None", "v6"};
-static const char * arm_attr_tag_FP_HP_extension[] =
- {"Not Allowed", "Allowed"};
-static const char * arm_attr_tag_ABI_FP_16bit_format[] =
- {"None", "IEEE 754", "Alternative Format"};
+ tag = read_uleb128 (p, &len, end);
+ p += len;
+
+ switch (tag)
+ {
+ case Tag_ARC_PCS_config:
+ val = read_uleb128 (p, &len, end);
+ p += len;
+ printf (" Tag_ARC_PCS_config: ");
+ switch (val)
+ {
+ case 0:
+ printf (_("Absent/Non standard\n"));
+ break;
+ case 1:
+ printf (_("Bare metal/mwdt\n"));
+ break;
+ case 2:
+ printf (_("Bare metal/newlib\n"));
+ break;
+ case 3:
+ printf (_("Linux/uclibc\n"));
+ break;
+ case 4:
+ printf (_("Linux/glibc\n"));
+ break;
+ default:
+ printf (_("Unknown\n"));
+ break;
+ }
+ break;
+
+ case Tag_ARC_CPU_base:
+ val = read_uleb128 (p, &len, end);
+ p += len;
+ printf (" Tag_ARC_CPU_base: ");
+ switch (val)
+ {
+ default:
+ case TAG_CPU_NONE:
+ printf (_("Absent\n"));
+ break;
+ case TAG_CPU_ARC6xx:
+ printf ("ARC6xx\n");
+ break;
+ case TAG_CPU_ARC7xx:
+ printf ("ARC7xx\n");
+ break;
+ case TAG_CPU_ARCEM:
+ printf ("ARCEM\n");
+ break;
+ case TAG_CPU_ARCHS:
+ printf ("ARCHS\n");
+ break;
+ }
+ break;
+
+ case Tag_ARC_CPU_variation:
+ val = read_uleb128 (p, &len, end);
+ p += len;
+ printf (" Tag_ARC_CPU_variation: ");
+ switch (val)
+ {
+ default:
+ if (val > 0 && val < 16)
+ {
+ printf ("Core%d\n", val);
+ break;
+ }
+ case 0:
+ printf (_("Absent\n"));
+ break;
+ }
+ break;
+
+ case Tag_ARC_CPU_name:
+ printf (" Tag_ARC_CPU_name: ");
+ p = display_tag_value (-1, p, end);
+ break;
+
+ case Tag_ARC_ABI_rf16:
+ val = read_uleb128 (p, &len, end);
+ p += len;
+ printf (" Tag_ARC_ABI_rf16: %s\n", val ? _("yes") : _("no"));
+ break;
+
+ case Tag_ARC_ABI_osver:
+ val = read_uleb128 (p, &len, end);
+ p += len;
+ printf (" Tag_ARC_ABI_osver: v%d\n", val);
+ break;
+
+ case Tag_ARC_ABI_pic:
+ case Tag_ARC_ABI_sda:
+ val = read_uleb128 (p, &len, end);
+ p += len;
+ printf (tag == Tag_ARC_ABI_sda ? " Tag_ARC_ABI_sda: "
+ : " Tag_ARC_ABI_pic: ");
+ switch (val)
+ {
+ case 0:
+ printf (_("Absent\n"));
+ break;
+ case 1:
+ printf ("MWDT\n");
+ break;
+ case 2:
+ printf ("GNU\n");
+ break;
+ default:
+ printf (_("Unknown\n"));
+ break;
+ }
+ break;
+
+ case Tag_ARC_ABI_tls:
+ val = read_uleb128 (p, &len, end);
+ p += len;
+ printf (" Tag_ARC_ABI_tls: %s\n", val ? "r25": "none");
+ break;
+
+ case Tag_ARC_ABI_enumsize:
+ val = read_uleb128 (p, &len, end);
+ p += len;
+ printf (" Tag_ARC_ABI_enumsize: %s\n", val ? _("default") :
+ _("smallest"));
+ break;
+
+ case Tag_ARC_ABI_exceptions:
+ val = read_uleb128 (p, &len, end);
+ p += len;
+ printf (" Tag_ARC_ABI_exceptions: %s\n", val ? _("OPTFP")
+ : _("default"));
+ break;
+
+ case Tag_ARC_ABI_double_size:
+ val = read_uleb128 (p, &len, end);
+ p += len;
+ printf (" Tag_ARC_ABI_double_size: %d\n", val);
+ break;
+
+ case Tag_ARC_ISA_config:
+ printf (" Tag_ARC_ISA_config: ");
+ p = display_tag_value (-1, p, end);
+ break;
+
+ case Tag_ARC_ISA_apex:
+ printf (" Tag_ARC_ISA_apex: ");
+ p = display_tag_value (-1, p, end);
+ break;
+
+ case Tag_ARC_ISA_mpy_option:
+ val = read_uleb128 (p, &len, end);
+ p += len;
+ printf (" Tag_ARC_ISA_mpy_option: %d\n", val);
+ break;
+
+ default:
+ return display_tag_value (tag & 1, p, end);
+ }
+
+ return p;
+}
+
+/* ARM EABI attributes section. */
+typedef struct
+{
+ unsigned int tag;
+ const char * name;
+ /* 0 = special, 1 = string, 2 = uleb123, > 0x80 == table lookup. */
+ unsigned int type;
+ const char ** table;
+} arm_attr_public_tag;
+
+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", "", "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", "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"};
+static const char * arm_attr_tag_WMMX_arch[] = {"No", "WMMXv1", "WMMXv2"};
+static const char * arm_attr_tag_Advanced_SIMD_arch[] =
+ {"No", "NEONv1", "NEONv1 with Fused-MAC", "NEON for ARMv8",
+ "NEON for ARMv8.1"};
+static const char * arm_attr_tag_PCS_config[] =
+ {"None", "Bare platform", "Linux application", "Linux DSO", "PalmOS 2004",
+ "PalmOS (reserved)", "SymbianOS 2004", "SymbianOS (reserved)"};
+static const char * arm_attr_tag_ABI_PCS_R9_use[] =
+ {"V6", "SB", "TLS", "Unused"};
+static const char * arm_attr_tag_ABI_PCS_RW_data[] =
+ {"Absolute", "PC-relative", "SB-relative", "None"};
+static const char * arm_attr_tag_ABI_PCS_RO_data[] =
+ {"Absolute", "PC-relative", "None"};
+static const char * arm_attr_tag_ABI_PCS_GOT_use[] =
+ {"None", "direct", "GOT-indirect"};
+static const char * arm_attr_tag_ABI_PCS_wchar_t[] =
+ {"None", "??? 1", "2", "??? 3", "4"};
+static const char * arm_attr_tag_ABI_FP_rounding[] = {"Unused", "Needed"};
+static const char * arm_attr_tag_ABI_FP_denormal[] =
+ {"Unused", "Needed", "Sign only"};
+static const char * arm_attr_tag_ABI_FP_exceptions[] = {"Unused", "Needed"};
+static const char * arm_attr_tag_ABI_FP_user_exceptions[] = {"Unused", "Needed"};
+static const char * arm_attr_tag_ABI_FP_number_model[] =
+ {"Unused", "Finite", "RTABI", "IEEE 754"};
+static const char * arm_attr_tag_ABI_enum_size[] =
+ {"Unused", "small", "int", "forced to int"};
+static const char * arm_attr_tag_ABI_HardFP_use[] =
+ {"As Tag_FP_arch", "SP only", "Reserved", "Deprecated"};
+static const char * arm_attr_tag_ABI_VFP_args[] =
+ {"AAPCS", "VFP registers", "custom", "compatible"};
+static const char * arm_attr_tag_ABI_WMMX_args[] =
+ {"AAPCS", "WMMX registers", "custom"};
+static const char * arm_attr_tag_ABI_optimization_goals[] =
+ {"None", "Prefer Speed", "Aggressive Speed", "Prefer Size",
+ "Aggressive Size", "Prefer Debug", "Aggressive Debug"};
+static const char * arm_attr_tag_ABI_FP_optimization_goals[] =
+ {"None", "Prefer Speed", "Aggressive Speed", "Prefer Size",
+ "Aggressive Size", "Prefer Accuracy", "Aggressive Accuracy"};
+static const char * arm_attr_tag_CPU_unaligned_access[] = {"None", "v6"};
+static const char * arm_attr_tag_FP_HP_extension[] =
+ {"Not Allowed", "Allowed"};
+static const char * arm_attr_tag_ABI_FP_16bit_format[] =
+ {"None", "IEEE 754", "Alternative Format"};
+static const char * arm_attr_tag_DSP_extension[] =
+ {"Follow architecture", "Allowed"};