aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-10-17 11:46:32 +0100
committerNick Clifton <nickc@redhat.com>2016-10-17 11:46:32 +0100
commit6d91379408b87b6d0c1cd4bc2880b530cc4ec721 (patch)
tree8f8b0e05296fe84bc3619001a3499356571d3545 /binutils
parent41f225defe891ff71d3c8a149cdc1ed8f3a64c5c (diff)
downloadgdb-6d91379408b87b6d0c1cd4bc2880b530cc4ec721.zip
gdb-6d91379408b87b6d0c1cd4bc2880b530cc4ec721.tar.gz
gdb-6d91379408b87b6d0c1cd4bc2880b530cc4ec721.tar.bz2
Update list of ELF machine numbers.
include * elf/common.h (DT_SYMTAB_SHNDX): Define. (EM_CLOUDSHIELD, EM_COREA_1ST, EM_COREA_2ND, EM_OPEN8): Define. (EM_VIDEOCORE5, EM_56800EX, EM_BA1, EM_BA2, EM_XCORE): Define. (EM_MCHP_PIC, EM_KM32, EM_KMX32, EM_KMX16, EM_KMX8): Define. (EM_KVARC, EM_CDP, EM_COGE, EM_COOL, EM_NORC): Define. (EM_CSR_KALIMBA, EM_Z80, EM_AMDGPU, EM_RISCV): Define. (ELFOSABI_OPENVOS): Define. (GRP_MASKOS, GRP_MASKPROC): Define. binutils * readelf.c (get_dynamic_type): Add DT_SYMTAB_SHNDX. (get_machine_type): Add EM_CLOUDSHIELD, EM_COREA_1ST, EM_COREA_2ND, EM_OPEN8, EM_VIDEOCORE5, EM_56800EX, EM_BA1, EM_BA2, EM_XCORE, EM_MCHP_PIC, EM_KM32, EM_KMX32, EM_KMX16, EM_KMX8, EM_KVARC, EM_CDP, EM_COGE, EM_COOL, EM_NORC, EM_CSR_KALIMBA, EM_Z80, EM_AMDGPU, EM_RISCV. (get_osabi_name): Add ELFOSABI_CLOUDABI and ELFOSABI_OPENVS. (get_group_flags): Update to handle flags in the GRP_MASKOS and GRP_MASKPROC ranges.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog12
-rw-r--r--binutils/readelf.c57
2 files changed, 60 insertions, 9 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 6bd65d7..4f33ba0 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,15 @@
+2016-10-17 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c (get_dynamic_type): Add DT_SYMTAB_SHNDX.
+ (get_machine_type): Add EM_CLOUDSHIELD, EM_COREA_1ST,
+ EM_COREA_2ND, EM_OPEN8, EM_VIDEOCORE5, EM_56800EX, EM_BA1, EM_BA2,
+ EM_XCORE, EM_MCHP_PIC, EM_KM32, EM_KMX32, EM_KMX16, EM_KMX8,
+ EM_KVARC, EM_CDP, EM_COGE, EM_COOL, EM_NORC, EM_CSR_KALIMBA,
+ EM_Z80, EM_AMDGPU, EM_RISCV.
+ (get_osabi_name): Add ELFOSABI_CLOUDABI and ELFOSABI_OPENVS.
+ (get_group_flags): Update to handle flags in the
+ GRP_MASKOS and GRP_MASKPROC ranges.
+
2016-10-14 Luis Machado <lgustavo@codesourcery.com>
* testsuite/lib/utils-lib.exp (run_dump_test): Call remote_download
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 8ca8f4b..55b687f 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -2011,6 +2011,7 @@ get_dynamic_type (unsigned long type)
case DT_PREINIT_ARRAY: return "PREINIT_ARRAY";
case DT_PREINIT_ARRAYSZ: return "PREINIT_ARRAYSZ";
+ case DT_SYMTAB_SHNDX: return "SYMTAB_SHNDX";
case DT_CHECKSUM: return "CHECKSUM";
case DT_PLTPADSZ: return "PLTPADSZ";
@@ -2340,6 +2341,29 @@ get_machine_name (unsigned e_machine)
case EM_TILEGX: return "Tilera TILE-Gx multicore architecture family";
case EM_CUDA: return "NVIDIA CUDA architecture";
case EM_XGATE: return "Motorola XGATE embedded processor";
+ case EM_CLOUDSHIELD: return "CloudShield architecture family";
+ case EM_COREA_1ST: return "KIPO-KAIST Core-A 1st generation processor family";
+ case EM_COREA_2ND: return "KIPO-KAIST Core-A 2nd generation processor family";
+ case EM_OPEN8: return "Open8 8-bit RISC soft processor core";
+ case EM_VIDEOCORE5: return "Broadcom VideoCore V processor";
+ case EM_56800EX: return "Freescale 56800EX Digital Signal Controller (DSC)";
+ case EM_BA1: return "Beyond BA1 CPU architecture";
+ case EM_BA2: return "Beyond BA2 CPU architecture";
+ case EM_XCORE: return "XMOS xCORE processor family";
+ case EM_MCHP_PIC: return "Microchip 8-bit PIC(r) family";
+ case EM_KM32: return "KM211 KM32 32-bit processor";
+ case EM_KMX32: return "KM211 KMX32 32-bit processor";
+ case EM_KMX16: return "KM211 KMX16 16-bit processor";
+ case EM_KMX8: return "KM211 KMX8 8-bit processor";
+ case EM_KVARC: return "KM211 KVARC processor";
+ case EM_CDP: return "Paneve CDP architecture family";
+ case EM_COGE: return "Cognitive Smart Memory Processor";
+ case EM_COOL: return "Bluechip Systems CoolEngine";
+ case EM_NORC: return "Nanoradio Optimized RISC";
+ case EM_CSR_KALIMBA: return "CSR Kalimba architecture family";
+ case EM_Z80: return "Zilog Z80";
+ case EM_AMDGPU: return "AMD GPU architecture";
+ case EM_RISCV: return "RISC-V";
default:
snprintf (buff, sizeof (buff), _("<unknown>: 0x%x"), e_machine);
return buff;
@@ -3534,6 +3558,8 @@ get_osabi_name (unsigned int osabi)
case ELFOSABI_NSK: return "HP - Non-Stop Kernel";
case ELFOSABI_AROS: return "AROS";
case ELFOSABI_FENIXOS: return "FenixOS";
+ case ELFOSABI_CLOUDABI: return "Nuxi CloudABI";
+ case ELFOSABI_OPENVOS: return "Stratus Technologies OpenVOS";
default:
if (osabi >= 64)
switch (elf_header.e_machine)
@@ -6254,18 +6280,31 @@ static const char *
get_group_flags (unsigned int flags)
{
static char buff[32];
- switch (flags)
- {
- case 0:
- return "";
- case GRP_COMDAT:
- return "COMDAT ";
+ if (flags == 0)
+ return "";
+ else if (flags == GRP_COMDAT)
+ return "COMDAT ";
+
+ snprintf (buff, 14, _("[0x%x: "), flags);
- default:
- snprintf (buff, sizeof (buff), _("[<unknown>: 0x%x] "), flags);
- break;
+ flags &= ~ GRP_COMDAT;
+ if (flags & GRP_MASKOS)
+ {
+ strcat (buff, "<OS specific>");
+ flags &= ~ GRP_MASKOS;
+ }
+
+ if (flags & GRP_MASKPROC)
+ {
+ strcat (buff, "<PROC specific>");
+ flags &= ~ GRP_MASKPROC;
}
+
+ if (flags)
+ strcat (buff, "<unknown>");
+
+ strcat (buff, "]");
return buff;
}