1 /* Returns a human readable description of an ELF header e_machine value. 2 Copyright (C) 2019 Red Hat, Inc. 3 This file is part of elfutils. 4 5 This file is free software; you can redistribute it and/or modify 6 it under the terms of either 7 8 * the GNU Lesser General Public License as published by the Free 9 Software Foundation; either version 3 of the License, or (at 10 your option) any later version 11 12 or 13 14 * the GNU General Public License as published by the Free 15 Software Foundation; either version 2 of the License, or (at 16 your option) any later version 17 18 or both in parallel, as here. 19 20 elfutils is distributed in the hope that it will be useful, but 21 WITHOUT ANY WARRANTY; without even the implied warranty of 22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 23 General Public License for more details. 24 25 You should have received copies of the GNU General Public License and 26 the GNU Lesser General Public License along with this program. If 27 not, see <http://www.gnu.org/licenses/>. */ 28 29 #ifdef HAVE_CONFIG_H 30 # include <config.h> 31 #endif 32 33 #include "libdwelf.h" 34 35 36 const char * dwelf_elf_e_machine_string(int machine)37dwelf_elf_e_machine_string (int machine) 38 { 39 switch (machine) 40 { 41 case EM_NONE: 42 return "None"; 43 case EM_M32: 44 return "WE32100"; 45 case EM_SPARC: 46 return "SPARC"; 47 case EM_386: 48 return "Intel 80386"; 49 case EM_68K: 50 return "M68K"; 51 case EM_88K: 52 return "M88K"; 53 case EM_IAMCU: 54 return "Intel MCU"; 55 case EM_860: 56 return "Intel 80860"; 57 case EM_MIPS: 58 return "MIPS R3000"; 59 case EM_S370: 60 return "IBM System/370"; 61 case EM_MIPS_RS3_LE: 62 return "MIPS R3000"; 63 case EM_PARISC: 64 return "HPPA"; 65 case EM_VPP500: 66 return "Fujitsu VPP500"; 67 case EM_SPARC32PLUS: 68 return "SPARC v8+"; 69 case EM_960: 70 return "Intel 80960"; 71 case EM_PPC: 72 return "PowerPC"; 73 case EM_PPC64: 74 return "PowerPC64"; 75 case EM_S390: 76 return "IBM S/390"; 77 case EM_SPU: 78 return "IBM SPU/SPC"; 79 case EM_V800: 80 return "NEC V800"; 81 case EM_FR20: 82 return "Fujitsu FR20"; 83 case EM_RH32: 84 return "TRW RH-32"; 85 case EM_RCE: 86 return "Motorola RCE"; 87 case EM_ARM: 88 return "ARM"; 89 case EM_FAKE_ALPHA: 90 return "Digital Alpha"; 91 case EM_SH: 92 return "SH"; 93 case EM_SPARCV9: 94 return "SPARC v9"; 95 case EM_TRICORE: 96 return "Siemens Tricore"; 97 case EM_ARC: 98 return "ARC"; 99 case EM_H8_300: 100 return "H8/300"; 101 case EM_H8_300H: 102 return "H8/300H"; 103 case EM_H8S: 104 return "H8S"; 105 case EM_H8_500: 106 return "H8/500"; 107 case EM_IA_64: 108 return "Intel IA-64"; 109 case EM_MIPS_X: 110 return "Stanford MIPS-X"; 111 case EM_COLDFIRE: 112 return "Motorola Coldfire"; 113 case EM_68HC12: 114 return "Motorola M68HC12"; 115 case EM_MMA: 116 return "Fujitsu MMA Multimedia Accelerator"; 117 case EM_PCP: 118 return "Siemens PCP"; 119 case EM_NCPU: 120 return "Sony nCPU embedded RISC"; 121 case EM_NDR1: 122 return "Denso NDR1 microprocessor"; 123 case EM_STARCORE: 124 return "Motorola Star*Core processor"; 125 case EM_ME16: 126 return "Toyota ME16 processor"; 127 case EM_ST100: 128 return "STMicroelectronic ST100"; 129 case EM_TINYJ: 130 return "Advanced Logic Corporation Tinyj"; 131 case EM_X86_64: 132 return "AMD x86-64"; 133 case EM_PDSP: 134 return "Sony DSP Processor"; 135 case EM_PDP10: 136 return "Digital PDP-10"; 137 case EM_PDP11: 138 return "Digital PDP-11"; 139 case EM_FX66: 140 return "Siemens FX66 microcontroller"; 141 case EM_ST9PLUS: 142 return "STMicroelectronics ST9+"; 143 case EM_ST7: 144 return "STMicroelectronics ST7"; 145 case EM_68HC16: 146 return "Motorola MC68HC16 microcontroller"; 147 case EM_68HC11: 148 return "Motorola MC68HC11 microcontroller"; 149 case EM_68HC08: 150 return "Motorola MC68HC08 microcontroller"; 151 case EM_68HC05: 152 return "Motorola MC68HC05 microcontroller"; 153 case EM_SVX: 154 return "Silicon Graphics SVx"; 155 case EM_ST19: 156 return "STMicroelectronics ST19"; 157 case EM_VAX: 158 return "Digital VAX"; 159 case EM_CRIS: 160 return "Axis Communications 32-bit embedded processor"; 161 case EM_JAVELIN: 162 return "Infineon Technologies 32-bit embedded processor"; 163 case EM_FIREPATH: 164 return "Element 14 64-bit DSP Processor"; 165 case EM_ZSP: 166 return "LSI Logic 16-bit DSP Processor"; 167 case EM_MMIX: 168 return "Donald Knuth's educational 64-bit processor"; 169 case EM_HUANY: 170 return "Harvard University machine-independent object"; 171 case EM_PRISM: 172 return "SiTera Prism"; 173 case EM_AVR: 174 return "Atmel AVR 8-bit microcontroller"; 175 case EM_FR30: 176 return "Fujitsu FR30"; 177 case EM_D10V: 178 return "Mitsubishi D10V"; 179 case EM_D30V: 180 return "Mitsubishi D30V"; 181 case EM_V850: 182 return "NEC v850"; 183 case EM_M32R: 184 return "Mitsubishi M32R"; 185 case EM_MN10300: 186 return "Matsushita MN10300"; 187 case EM_MN10200: 188 return "Matsushita MN10200"; 189 case EM_PJ: 190 return "picoJava"; 191 case EM_OPENRISC: 192 return "OpenRISC"; 193 case EM_ARC_COMPACT: 194 return "ARC International ARCompact"; 195 case EM_XTENSA: 196 return "Tensilica Xtensa Architecture"; 197 case EM_VIDEOCORE: 198 return "Alphamosaic VideoCore"; 199 case EM_TMM_GPP: 200 return "Thompson Multimedia General Purpose Processor"; 201 case EM_NS32K: 202 return "National Semiconductor 32000"; 203 case EM_TPC: 204 return "Tenor Network TPC"; 205 case EM_SNP1K: 206 return "Trebia SNP 1000"; 207 case EM_ST200: 208 return "STMicroelectronics ST200"; 209 case EM_IP2K: 210 return "Ubicom IP2xxx"; 211 case EM_MAX: 212 return "MAX processor"; 213 case EM_CR: 214 return "National Semiconductor CompactRISC"; 215 case EM_F2MC16: 216 return "Fujitsu F2MC16"; 217 case EM_MSP430: 218 return "Texas Instruments msp430"; 219 case EM_BLACKFIN: 220 return "Analog Devices Blackfin DSP"; 221 case EM_SE_C33: 222 return "Seiko Epson S1C33"; 223 case EM_SEP: 224 return "Sharp embedded microprocessor"; 225 case EM_ARCA: 226 return "Arca RISC"; 227 case EM_UNICORE: 228 return "Unicore"; 229 case EM_EXCESS: 230 return "eXcess configurable CPU"; 231 case EM_DXP: 232 return "Icera Semiconductor Deep Execution Processor"; 233 case EM_ALTERA_NIOS2: 234 return "Altera Nios II"; 235 case EM_CRX: 236 return "National Semiconductor CompactRISC CRX"; 237 case EM_XGATE: 238 return "Motorola XGATE"; 239 case EM_C166: 240 return "Infineon C16x/XC16x"; 241 case EM_M16C: 242 return "Renesas M16C"; 243 case EM_DSPIC30F: 244 return "Microchip Technology dsPIC30F"; 245 case EM_CE: 246 return "Freescale Communication Engine RISC"; 247 case EM_M32C: 248 return "Renesas M32C"; 249 case EM_TSK3000: 250 return "Altium TSK3000"; 251 case EM_RS08: 252 return "Freescale RS08"; 253 case EM_SHARC: 254 return "Analog Devices SHARC"; 255 case EM_ECOG2: 256 return "Cyan Technology eCOG2"; 257 case EM_SCORE7: 258 return "Sunplus S+core7 RISC"; 259 case EM_DSP24: 260 return "New Japan Radio (NJR) 24-bit DSP"; 261 case EM_VIDEOCORE3: 262 return "Broadcom VideoCore III"; 263 case EM_LATTICEMICO32: 264 return "RISC for Lattice FPGA"; 265 case EM_SE_C17: 266 return "Seiko Epson C17"; 267 case EM_TI_C6000: 268 return "Texas Instruments TMS320C6000 DSP"; 269 case EM_TI_C2000: 270 return "Texas Instruments TMS320C2000 DSP"; 271 case EM_TI_C5500: 272 return "Texas Instruments TMS320C55x DSP"; 273 case EM_TI_ARP32: 274 return "Texas Instruments Application Specific RISC"; 275 case EM_TI_PRU: 276 return "Texas Instruments Programmable Realtime Unit"; 277 case EM_MMDSP_PLUS: 278 return "STMicroelectronics 64bit VLIW DSP"; 279 case EM_CYPRESS_M8C: 280 return "Cypress M8C"; 281 case EM_R32C: 282 return "Renesas R32C"; 283 case EM_TRIMEDIA: 284 return "NXP Semiconductors TriMedia"; 285 case EM_QDSP6: 286 return "QUALCOMM DSP6"; 287 case EM_8051: 288 return "Intel 8051 and variants"; 289 case EM_STXP7X: 290 return "STMicroelectronics STxP7x"; 291 case EM_NDS32: 292 return "Andes Technology compact code size embedded RISC"; 293 case EM_ECOG1X: 294 return "Cyan Technology eCOG1X"; 295 case EM_MAXQ30: 296 return "Dallas Semiconductor MAXQ30"; 297 case EM_XIMO16: 298 return "New Japan Radio (NJR) 16-bit DSP"; 299 case EM_MANIK: 300 return "M2000 Reconfigurable RISC"; 301 case EM_CRAYNV2: 302 return "Cray NV2 vector architecture"; 303 case EM_RX: 304 return "Renesas RX"; 305 case EM_METAG: 306 return "Imagination Technologies META"; 307 case EM_MCST_ELBRUS: 308 return "MCST Elbrus"; 309 case EM_ECOG16: 310 return "Cyan Technology eCOG16"; 311 case EM_CR16: 312 return "National Semiconductor CompactRISC"; 313 case EM_ETPU: 314 return "Freescale Extended Time Processing Unit"; 315 case EM_SLE9X: 316 return "Infineon Technologies SLE9X"; 317 case EM_L10M: 318 return "Intel L10M"; 319 case EM_K10M: 320 return "Intel K10M"; 321 case EM_AARCH64: 322 return "AARCH64"; 323 case EM_AVR32: 324 return "Amtel AVR32"; 325 case EM_STM8: 326 return "STMicroelectronics STM8"; 327 case EM_TILE64: 328 return "Tilera TILE64"; 329 case EM_TILEPRO: 330 return "Tilera TILEPro"; 331 case EM_MICROBLAZE: 332 return "Xilinx MicroBlaze"; 333 case EM_CUDA: 334 return "NVIDIA CUDA"; 335 case EM_TILEGX: 336 return "Tilera TILE-Gx"; 337 case EM_CLOUDSHIELD: 338 return "CloudShield"; 339 case EM_COREA_1ST: 340 return "KIPO-KAIST Core-A 1st gen"; 341 case EM_COREA_2ND: 342 return "KIPO-KAIST Core-A 2nd gen"; 343 case EM_ARCV2: 344 return "Synopsys ARCv2 ISA"; 345 case EM_OPEN8: 346 return "Open8 RISC"; 347 case EM_RL78: 348 return "Renesas RL78"; 349 case EM_VIDEOCORE5: 350 return "Broadcom VideoCore V"; 351 case EM_78KOR: 352 return "Renesas 78KOR"; 353 case EM_56800EX: 354 return "Freescale 56800EX DSC"; 355 case EM_BA1: 356 return "Beyond BA1"; 357 case EM_BA2: 358 return "Beyond BA2"; 359 case EM_XCORE: 360 return "XMOS xCORE"; 361 case EM_MCHP_PIC: 362 return "Microchip 8-bit PIC"; 363 case EM_INTELGT: 364 return "Intel Graphics Technology"; 365 case EM_KM32: 366 return "KM211 KM32"; 367 case EM_KMX32: 368 return "KM211 KMX32"; 369 case EM_EMX16: 370 return "KM211 KMX16"; 371 case EM_EMX8: 372 return "KM211 KMX8"; 373 case EM_KVARC: 374 return "KM211 KVARC"; 375 case EM_CDP: 376 return "Paneve CDP"; 377 case EM_COGE: 378 return "Cognitive Smart Memory Processor"; 379 case EM_COOL: 380 return "Bluechip CoolEngine"; 381 case EM_NORC: 382 return "Nanoradio Optimized RISC"; 383 case EM_CSR_KALIMBA: 384 return "CSR Kalimba"; 385 case EM_Z80: 386 return "Zilog Z80"; 387 case EM_VISIUM: 388 return "CDS VISIUMcore"; 389 case EM_FT32: 390 return "FTDI Chip FT32"; 391 case EM_MOXIE: 392 return "Moxie"; 393 case EM_AMDGPU: 394 return "AMD GPU"; 395 case EM_RISCV: 396 return "RISC-V"; 397 case EM_BPF: 398 return "BPF"; 399 case EM_CSKY: 400 return "C-SKY"; 401 case EM_LOONGARCH: 402 return "LoongArch"; 403 404 case EM_ALPHA: 405 return "Alpha"; 406 407 default: 408 return NULL; 409 } 410 } 411