/* readelf.c -- display contents of an ELF format file
- Copyright (C) 1998-2020 Free Software Foundation, Inc.
+ Copyright (C) 1998-2021 Free Software Foundation, Inc.
Originally developed by Eric Youngdale <eric@andante.jic.com>
Modifications by Nick Clifton <nickc@redhat.com>
case DT_GNU_LIBLIST: return "GNU_LIBLIST";
case DT_GNU_LIBLISTSZ: return "GNU_LIBLISTSZ";
case DT_GNU_HASH: return "GNU_HASH";
+ case DT_GNU_FLAGS_1: return "GNU_FLAGS_1";
default:
if ((type >= DT_LOPROC) && (type <= DT_HIPROC))
case EM_FT32: return "FTDI Chip FT32";
case EM_MOXIE: return "Moxie";
case EM_AMDGPU: return "AMD GPU";
+ /* 230 (all reserved) */
+ /* 240 */
case EM_RISCV: return "RISC-V";
case EM_LANAI: return "Lanai 32-bit processor";
+ case EM_CEVA: return "CEVA Processor Architecture Family";
+ case EM_CEVA_X2: return "CEVA X2 Processor Family";
case EM_BPF: return "Linux BPF";
+ case EM_GRAPHCORE_IPU: return "Graphcore Intelligent Processing Unit";
+ case EM_IMG1: return "Imagination Technologies";
+ /* 250 */
case EM_NFP: return "Netronome Flow Processor";
+ case EM_VE: return "NEC Vector Engine";
+ case EM_CSKY: return "C-SKY";
+ case EM_ARC_COMPACT3_64: return "Synopsys ARCv2.3 64-bit";
+ case EM_MCS6502: return "MOS Technology MCS 6502 processor";
+ case EM_ARC_COMPACT3: return "Synopsys ARCv2.3 32-bit";
+ case EM_KVX: return "Kalray VLIW core of the MPPA processor family";
+ case EM_65816: return "WDC 65816/65C816";
+ case EM_LOONGARCH: return "Loongson Loongarch";
+ case EM_KF32: return "ChipON KungFu32";
/* Large numbers... */
case EM_MT: return "Morpho Techologies MT processor";
case EM_ADAPTEVA_EPIPHANY: return "Adapteva EPIPHANY";
case EM_CYGNUS_FRV: return "Fujitsu FR-V";
case EM_S12Z: return "Freescale S12Z";
- case EM_CSKY: return "C-SKY";
default:
snprintf (buff, sizeof (buff), _("<unknown>: 0x%x"), e_machine);
#define VMS_EPOCH_OFFSET 35067168000000000LL
#define VMS_GRANULARITY_FACTOR 10000000
+#ifndef INT64_MIN
+#define INT64_MIN (-9223372036854775807LL - 1)
+#endif
/* Display a VMS time in a human readable format. */
static void
print_vms_time (bfd_int64_t vmstime)
{
- struct tm *tm;
+ struct tm *tm = NULL;
time_t unxtime;
- unxtime = (vmstime - VMS_EPOCH_OFFSET) / VMS_GRANULARITY_FACTOR;
- tm = gmtime (&unxtime);
- printf ("%04u-%02u-%02uT%02u:%02u:%02u",
- tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
- tm->tm_hour, tm->tm_min, tm->tm_sec);
+ if (vmstime >= INT64_MIN + VMS_EPOCH_OFFSET)
+ {
+ vmstime = (vmstime - VMS_EPOCH_OFFSET) / VMS_GRANULARITY_FACTOR;
+ unxtime = vmstime;
+ if (unxtime == vmstime)
+ tm = gmtime (&unxtime);
+ }
+ if (tm != NULL)
+ printf ("%04u-%02u-%02uT%02u:%02u:%02u",
+ tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
+ tm->tm_hour, tm->tm_min, tm->tm_sec);
}
#endif /* BFD64 */
}
break;
+ case DT_GNU_FLAGS_1:
+ if (do_dynamic)
+ {
+ printf (_("Flags:"));
+ if (entry->d_un.d_val == 0)
+ printf (_(" None\n"));
+ else
+ {
+ unsigned long int val = entry->d_un.d_val;
+
+ if (val & DF_GNU_1_UNIQUE)
+ {
+ printf (" UNIQUE");
+ val ^= DF_GNU_1_UNIQUE;
+ }
+ if (val != 0)
+ printf (" %lx", val);
+ puts ("");
+ }
+ }
+ break;
+
default:
if ((entry->d_tag >= DT_VERSYM) && (entry->d_tag <= DT_VERNEEDNUM))
filedata->version_info[DT_VERSIONTAGIDX (entry->d_tag)]
case GNU_PROPERTY_X86_FEATURE_1_SHSTK:
printf ("SHSTK");
break;
+ case GNU_PROPERTY_X86_FEATURE_1_LAM_U48:
+ printf ("LAM_U48");
+ break;
+ case GNU_PROPERTY_X86_FEATURE_1_LAM_U57:
+ printf ("LAM_U57");
+ break;
default:
printf (_("<unknown: %x>"), bit);
break;