LLVM  14.0.0git
ELF.cpp
Go to the documentation of this file.
1 //===- llvm/BinaryFormat/ELF.cpp - The ELF format ---------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
10 #include "llvm/ADT/DenseMap.h"
11 #include "llvm/ADT/StringSwitch.h"
12 #include "llvm/Support/Error.h"
13 
14 using namespace llvm;
15 using namespace ELF;
16 
17 /// Convert an architecture name into ELF's e_machine value.
19  std::string LowerArch = Arch.lower();
20  return StringSwitch<uint16_t>(LowerArch)
21  .Case("none", EM_NONE)
22  .Case("m32", EM_M32)
23  .Case("sparc", EM_SPARC)
24  .Case("386", EM_386)
25  .Case("68k", EM_68K)
26  .Case("88k", EM_88K)
27  .Case("iamcu", EM_IAMCU)
28  .Case("860", EM_860)
29  .Case("mips", EM_MIPS)
30  .Case("s370", EM_S370)
31  .Case("mips_rs3_le", EM_MIPS_RS3_LE)
32  .Case("parisc", EM_PARISC)
33  .Case("vpp500", EM_VPP500)
34  .Case("sparc32plus", EM_SPARC32PLUS)
35  .Case("960", EM_960)
36  .Case("ppc", EM_PPC)
37  .Case("ppc64", EM_PPC64)
38  .Case("s390", EM_S390)
39  .Case("spu", EM_SPU)
40  .Case("v800", EM_V800)
41  .Case("fr20", EM_FR20)
42  .Case("rh32", EM_RH32)
43  .Case("rce", EM_RCE)
44  .Case("arm", EM_ARM)
45  .Case("alpha", EM_ALPHA)
46  .Case("sh", EM_SH)
47  .Case("sparcv9", EM_SPARCV9)
48  .Case("tricore", EM_TRICORE)
49  .Case("arc", EM_ARC)
50  .Case("h8_300", EM_H8_300)
51  .Case("h8_300h", EM_H8_300H)
52  .Case("h8s", EM_H8S)
53  .Case("h8_500", EM_H8_500)
54  .Case("ia_64", EM_IA_64)
55  .Case("mips_x", EM_MIPS_X)
56  .Case("coldfire", EM_COLDFIRE)
57  .Case("68hc12", EM_68HC12)
58  .Case("mma", EM_MMA)
59  .Case("pcp", EM_PCP)
60  .Case("ncpu", EM_NCPU)
61  .Case("ndr1", EM_NDR1)
62  .Case("starcore", EM_STARCORE)
63  .Case("me16", EM_ME16)
64  .Case("st100", EM_ST100)
65  .Case("tinyj", EM_TINYJ)
66  .Case("x86_64", EM_X86_64)
67  .Case("pdsp", EM_PDSP)
68  .Case("pdp10", EM_PDP10)
69  .Case("pdp11", EM_PDP11)
70  .Case("fx66", EM_FX66)
71  .Case("st9plus", EM_ST9PLUS)
72  .Case("st7", EM_ST7)
73  .Case("68hc16", EM_68HC16)
74  .Case("68hc11", EM_68HC11)
75  .Case("68hc08", EM_68HC08)
76  .Case("68hc05", EM_68HC05)
77  .Case("svx", EM_SVX)
78  .Case("st19", EM_ST19)
79  .Case("vax", EM_VAX)
80  .Case("cris", EM_CRIS)
81  .Case("javelin", EM_JAVELIN)
82  .Case("firepath", EM_FIREPATH)
83  .Case("zsp", EM_ZSP)
84  .Case("mmix", EM_MMIX)
85  .Case("huany", EM_HUANY)
86  .Case("prism", EM_PRISM)
87  .Case("avr", EM_AVR)
88  .Case("fr30", EM_FR30)
89  .Case("d10v", EM_D10V)
90  .Case("d30v", EM_D30V)
91  .Case("v850", EM_V850)
92  .Case("m32r", EM_M32R)
93  .Case("mn10300", EM_MN10300)
94  .Case("mn10200", EM_MN10200)
95  .Case("pj", EM_PJ)
96  .Case("openrisc", EM_OPENRISC)
97  .Case("arc_compact", EM_ARC_COMPACT)
98  .Case("xtensa", EM_XTENSA)
99  .Case("videocore", EM_VIDEOCORE)
100  .Case("tmm_gpp", EM_TMM_GPP)
101  .Case("ns32k", EM_NS32K)
102  .Case("tpc", EM_TPC)
103  .Case("snp1k", EM_SNP1K)
104  .Case("st200", EM_ST200)
105  .Case("ip2k", EM_IP2K)
106  .Case("max", EM_MAX)
107  .Case("cr", EM_CR)
108  .Case("f2mc16", EM_F2MC16)
109  .Case("msp430", EM_MSP430)
110  .Case("blackfin", EM_BLACKFIN)
111  .Case("se_c33", EM_SE_C33)
112  .Case("sep", EM_SEP)
113  .Case("arca", EM_ARCA)
114  .Case("unicore", EM_UNICORE)
115  .Case("excess", EM_EXCESS)
116  .Case("dxp", EM_DXP)
117  .Case("altera_nios2", EM_ALTERA_NIOS2)
118  .Case("crx", EM_CRX)
119  .Case("xgate", EM_XGATE)
120  .Case("c166", EM_C166)
121  .Case("m16c", EM_M16C)
122  .Case("dspic30f", EM_DSPIC30F)
123  .Case("ce", EM_CE)
124  .Case("m32c", EM_M32C)
125  .Case("tsk3000", EM_TSK3000)
126  .Case("rs08", EM_RS08)
127  .Case("sharc", EM_SHARC)
128  .Case("ecog2", EM_ECOG2)
129  .Case("score7", EM_SCORE7)
130  .Case("dsp24", EM_DSP24)
131  .Case("videocore3", EM_VIDEOCORE3)
132  .Case("latticemico32", EM_LATTICEMICO32)
133  .Case("se_c17", EM_SE_C17)
134  .Case("ti_c6000", EM_TI_C6000)
135  .Case("ti_c2000", EM_TI_C2000)
136  .Case("ti_c5500", EM_TI_C5500)
137  .Case("mmdsp_plus", EM_MMDSP_PLUS)
138  .Case("cypress_m8c", EM_CYPRESS_M8C)
139  .Case("r32c", EM_R32C)
140  .Case("trimedia", EM_TRIMEDIA)
141  .Case("hexagon", EM_HEXAGON)
142  .Case("8051", EM_8051)
143  .Case("stxp7x", EM_STXP7X)
144  .Case("nds32", EM_NDS32)
145  .Case("ecog1", EM_ECOG1)
146  .Case("ecog1x", EM_ECOG1X)
147  .Case("maxq30", EM_MAXQ30)
148  .Case("ximo16", EM_XIMO16)
149  .Case("manik", EM_MANIK)
150  .Case("craynv2", EM_CRAYNV2)
151  .Case("rx", EM_RX)
152  .Case("metag", EM_METAG)
153  .Case("mcst_elbrus", EM_MCST_ELBRUS)
154  .Case("ecog16", EM_ECOG16)
155  .Case("cr16", EM_CR16)
156  .Case("etpu", EM_ETPU)
157  .Case("sle9x", EM_SLE9X)
158  .Case("l10m", EM_L10M)
159  .Case("k10m", EM_K10M)
160  .Case("aarch64", EM_AARCH64)
161  .Case("avr32", EM_AVR32)
162  .Case("stm8", EM_STM8)
163  .Case("tile64", EM_TILE64)
164  .Case("tilepro", EM_TILEPRO)
165  .Case("cuda", EM_CUDA)
166  .Case("tilegx", EM_TILEGX)
167  .Case("cloudshield", EM_CLOUDSHIELD)
168  .Case("corea_1st", EM_COREA_1ST)
169  .Case("corea_2nd", EM_COREA_2ND)
170  .Case("arc_compact2", EM_ARC_COMPACT2)
171  .Case("open8", EM_OPEN8)
172  .Case("rl78", EM_RL78)
173  .Case("videocore5", EM_VIDEOCORE5)
174  .Case("78kor", EM_78KOR)
175  .Case("56800ex", EM_56800EX)
176  .Case("ba1", EM_BA1)
177  .Case("ba2", EM_BA2)
178  .Case("xcore", EM_XCORE)
179  .Case("mchp_pic", EM_MCHP_PIC)
180  .Case("intel205", EM_INTEL205)
181  .Case("intel206", EM_INTEL206)
182  .Case("intel207", EM_INTEL207)
183  .Case("intel208", EM_INTEL208)
184  .Case("intel209", EM_INTEL209)
185  .Case("km32", EM_KM32)
186  .Case("kmx32", EM_KMX32)
187  .Case("kmx16", EM_KMX16)
188  .Case("kmx8", EM_KMX8)
189  .Case("kvarc", EM_KVARC)
190  .Case("cdp", EM_CDP)
191  .Case("coge", EM_COGE)
192  .Case("cool", EM_COOL)
193  .Case("norc", EM_NORC)
194  .Case("csr_kalimba", EM_CSR_KALIMBA)
195  .Case("amdgpu", EM_AMDGPU)
196  .Case("riscv", EM_RISCV)
197  .Case("lanai", EM_LANAI)
198  .Case("bpf", EM_BPF)
199  .Case("ve", EM_VE)
200  .Case("csky", EM_CSKY)
201  .Default(EM_NONE);
202 }
203 
204 /// Convert an ELF's e_machine value into an architecture name.
206  switch (EMachine) {
207  case EM_NONE:
208  return "None";
209  case EM_M32:
210  return "m32";
211  case EM_SPARC:
212  return "sparc";
213  case EM_386:
214  return "386";
215  case EM_68K:
216  return "68k";
217  case EM_88K:
218  return "88k";
219  case EM_IAMCU:
220  return "iamcu";
221  case EM_860:
222  return "860";
223  case EM_MIPS:
224  return "mips";
225  case EM_S370:
226  return "s370";
227  case EM_MIPS_RS3_LE:
228  return "mips_rs3_le";
229  case EM_PARISC:
230  return "parisc";
231  case EM_VPP500:
232  return "vpp500";
233  case EM_SPARC32PLUS:
234  return "sparc32plus";
235  case EM_960:
236  return "960";
237  case EM_PPC:
238  return "ppc";
239  case EM_PPC64:
240  return "ppc64";
241  case EM_S390:
242  return "s390";
243  case EM_SPU:
244  return "spu";
245  case EM_V800:
246  return "v800";
247  case EM_FR20:
248  return "fr20";
249  case EM_RH32:
250  return "rh32";
251  case EM_RCE:
252  return "rce";
253  case EM_ARM:
254  return "arm";
255  case EM_ALPHA:
256  return "alpha";
257  case EM_SH:
258  return "sh";
259  case EM_SPARCV9:
260  return "sparcv9";
261  case EM_TRICORE:
262  return "tricore";
263  case EM_ARC:
264  return "arc";
265  case EM_H8_300:
266  return "h8_300";
267  case EM_H8_300H:
268  return "h8_300h";
269  case EM_H8S:
270  return "h8s";
271  case EM_H8_500:
272  return "h8_500";
273  case EM_IA_64:
274  return "ia_64";
275  case EM_MIPS_X:
276  return "mips_x";
277  case EM_COLDFIRE:
278  return "coldfire";
279  case EM_68HC12:
280  return "68hc12";
281  case EM_MMA:
282  return "mma";
283  case EM_PCP:
284  return "pcp";
285  case EM_NCPU:
286  return "ncpu";
287  case EM_NDR1:
288  return "ndr1";
289  case EM_STARCORE:
290  return "starcore";
291  case EM_ME16:
292  return "me16";
293  case EM_ST100:
294  return "st100";
295  case EM_TINYJ:
296  return "tinyj";
297  case EM_X86_64:
298  return "x86_64";
299  case EM_PDSP:
300  return "pdsp";
301  case EM_PDP10:
302  return "pdp10";
303  case EM_PDP11:
304  return "pdp11";
305  case EM_FX66:
306  return "fx66";
307  case EM_ST9PLUS:
308  return "st9plus";
309  case EM_ST7:
310  return "st7";
311  case EM_68HC16:
312  return "68hc16";
313  case EM_68HC11:
314  return "68hc11";
315  case EM_68HC08:
316  return "68hc08";
317  case EM_68HC05:
318  return "68hc05";
319  case EM_SVX:
320  return "svx";
321  case EM_ST19:
322  return "st19";
323  case EM_VAX:
324  return "vax";
325  case EM_CRIS:
326  return "cris";
327  case EM_JAVELIN:
328  return "javelin";
329  case EM_FIREPATH:
330  return "firepath";
331  case EM_ZSP:
332  return "zsp";
333  case EM_MMIX:
334  return "mmix";
335  case EM_HUANY:
336  return "huany";
337  case EM_PRISM:
338  return "prism";
339  case EM_AVR:
340  return "avr";
341  case EM_FR30:
342  return "fr30";
343  case EM_D10V:
344  return "d10v";
345  case EM_D30V:
346  return "d30v";
347  case EM_V850:
348  return "v850";
349  case EM_M32R:
350  return "m32r";
351  case EM_MN10300:
352  return "mn10300";
353  case EM_MN10200:
354  return "mn10200";
355  case EM_PJ:
356  return "pj";
357  case EM_OPENRISC:
358  return "openrisc";
359  case EM_ARC_COMPACT:
360  return "arc_compact";
361  case EM_XTENSA:
362  return "xtensa";
363  case EM_VIDEOCORE:
364  return "videocore";
365  case EM_TMM_GPP:
366  return "tmm_gpp";
367  case EM_NS32K:
368  return "ns32k";
369  case EM_TPC:
370  return "tpc";
371  case EM_SNP1K:
372  return "snp1k";
373  case EM_ST200:
374  return "st200";
375  case EM_IP2K:
376  return "ip2k";
377  case EM_MAX:
378  return "max";
379  case EM_CR:
380  return "cr";
381  case EM_F2MC16:
382  return "f2mc16";
383  case EM_MSP430:
384  return "msp430";
385  case EM_BLACKFIN:
386  return "blackfin";
387  case EM_SE_C33:
388  return "se_c33";
389  case EM_SEP:
390  return "sep";
391  case EM_ARCA:
392  return "arca";
393  case EM_UNICORE:
394  return "unicore";
395  case EM_EXCESS:
396  return "excess";
397  case EM_DXP:
398  return "dxp";
399  case EM_ALTERA_NIOS2:
400  return "altera_nios2";
401  case EM_CRX:
402  return "crx";
403  case EM_XGATE:
404  return "xgate";
405  case EM_C166:
406  return "c166";
407  case EM_M16C:
408  return "m16c";
409  case EM_DSPIC30F:
410  return "dspic30f";
411  case EM_CE:
412  return "ce";
413  case EM_M32C:
414  return "m32c";
415  case EM_TSK3000:
416  return "tsk3000";
417  case EM_RS08:
418  return "rs08";
419  case EM_SHARC:
420  return "sharc";
421  case EM_ECOG2:
422  return "ecog2";
423  case EM_SCORE7:
424  return "score7";
425  case EM_DSP24:
426  return "dsp24";
427  case EM_VIDEOCORE3:
428  return "videocore3";
429  case EM_LATTICEMICO32:
430  return "latticemico32";
431  case EM_SE_C17:
432  return "se_c17";
433  case EM_TI_C6000:
434  return "ti_c6000";
435  case EM_TI_C2000:
436  return "ti_c2000";
437  case EM_TI_C5500:
438  return "ti_c5500";
439  case EM_MMDSP_PLUS:
440  return "mmdsp_plus";
441  case EM_CYPRESS_M8C:
442  return "cypress_m8c";
443  case EM_R32C:
444  return "r32c";
445  case EM_TRIMEDIA:
446  return "trimedia";
447  case EM_HEXAGON:
448  return "hexagon";
449  case EM_8051:
450  return "8051";
451  case EM_STXP7X:
452  return "stxp7x";
453  case EM_NDS32:
454  return "nds32";
455  case EM_ECOG1:
456  return "ecog1";
457  case EM_MAXQ30:
458  return "maxq30";
459  case EM_XIMO16:
460  return "ximo16";
461  case EM_MANIK:
462  return "manik";
463  case EM_CRAYNV2:
464  return "craynv2";
465  case EM_RX:
466  return "rx";
467  case EM_METAG:
468  return "metag";
469  case EM_MCST_ELBRUS:
470  return "mcst_elbrus";
471  case EM_ECOG16:
472  return "ecog16";
473  case EM_CR16:
474  return "cr16";
475  case EM_ETPU:
476  return "etpu";
477  case EM_SLE9X:
478  return "sle9x";
479  case EM_L10M:
480  return "l10m";
481  case EM_K10M:
482  return "k10m";
483  case EM_AARCH64:
484  return "AArch64";
485  case EM_AVR32:
486  return "avr32";
487  case EM_STM8:
488  return "stm8";
489  case EM_TILE64:
490  return "tile64";
491  case EM_TILEPRO:
492  return "tilepro";
493  case EM_CUDA:
494  return "cuda";
495  case EM_TILEGX:
496  return "tilegx";
497  case EM_CLOUDSHIELD:
498  return "cloudshield";
499  case EM_COREA_1ST:
500  return "corea_1st";
501  case EM_COREA_2ND:
502  return "corea_2nd";
503  case EM_ARC_COMPACT2:
504  return "arc_compact2";
505  case EM_OPEN8:
506  return "open8";
507  case EM_RL78:
508  return "rl78";
509  case EM_VIDEOCORE5:
510  return "videocore5";
511  case EM_78KOR:
512  return "78kor";
513  case EM_56800EX:
514  return "56800ex";
515  case EM_BA1:
516  return "ba1";
517  case EM_BA2:
518  return "ba2";
519  case EM_XCORE:
520  return "xcore";
521  case EM_MCHP_PIC:
522  return "mchp_pic";
523  case EM_INTEL205:
524  return "intel205";
525  case EM_INTEL206:
526  return "intel206";
527  case EM_INTEL207:
528  return "intel207";
529  case EM_INTEL208:
530  return "intel208";
531  case EM_INTEL209:
532  return "intel209";
533  case EM_KM32:
534  return "km32";
535  case EM_KMX32:
536  return "kmx32";
537  case EM_KMX16:
538  return "kmx16";
539  case EM_KMX8:
540  return "kmx8";
541  case EM_KVARC:
542  return "kvarc";
543  case EM_CDP:
544  return "cdp";
545  case EM_COGE:
546  return "coge";
547  case EM_COOL:
548  return "cool";
549  case EM_NORC:
550  return "norc";
551  case EM_CSR_KALIMBA:
552  return "csr_kalimba";
553  case EM_AMDGPU:
554  return "amdgpu";
555  case EM_RISCV:
556  return "riscv";
557  case EM_LANAI:
558  return "lanai";
559  case EM_BPF:
560  return "bpf";
561  case EM_VE:
562  return "ve";
563  case EM_CSKY:
564  return "csky";
565  default:
566  return "None";
567  }
568 }
llvm::ELF::EM_VPP500
@ EM_VPP500
Definition: ELF.h:146
llvm::StringSwitch::Case
StringSwitch & Case(StringLiteral S, T Value)
Definition: StringSwitch.h:67
llvm::ELF::EM_S390
@ EM_S390
Definition: ELF.h:151
llvm::ELF::EM_STM8
@ EM_STM8
Definition: ELF.h:283
llvm::ELF::EM_ARC
@ EM_ARC
Definition: ELF.h:162
llvm::ELF::EM_SPARC
@ EM_SPARC
Definition: ELF.h:136
llvm::ELF::EM_MMA
@ EM_MMA
Definition: ELF.h:171
llvm::ELF::EM_H8_300H
@ EM_H8_300H
Definition: ELF.h:164
llvm::ELF::EM_METAG
@ EM_METAG
Definition: ELF.h:271
llvm::ELF::EM_OPENRISC
@ EM_OPENRISC
Definition: ELF.h:209
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
llvm::ELF::EM_L10M
@ EM_L10M
Definition: ELF.h:279
llvm::ELF::EM_INTEL205
@ EM_INTEL205
Definition: ELF.h:302
llvm::ELF::EM_NORC
@ EM_NORC
Definition: ELF.h:315
llvm::ELF::EM_CLOUDSHIELD
@ EM_CLOUDSHIELD
Definition: ELF.h:289
llvm::ELF::EM_ARM
@ EM_ARM
Definition: ELF.h:157
llvm::ELF::EM_TI_C5500
@ EM_TI_C5500
Definition: ELF.h:253
llvm::ELF::EM_860
@ EM_860
Definition: ELF.h:141
llvm::ELF::EM_XCORE
@ EM_XCORE
Definition: ELF.h:300
llvm::StringSwitch::Default
LLVM_NODISCARD R Default(T Value)
Definition: StringSwitch.h:181
llvm::ELF::EM_M32C
@ EM_M32C
Definition: ELF.h:240
llvm::ELF::EM_AARCH64
@ EM_AARCH64
Definition: ELF.h:281
llvm::ELF::EM_D10V
@ EM_D10V
Definition: ELF.h:202
llvm::ELF::EM_BA2
@ EM_BA2
Definition: ELF.h:299
llvm::ELF::EM_MN10300
@ EM_MN10300
Definition: ELF.h:206
llvm::ELF::EM_COLDFIRE
@ EM_COLDFIRE
Definition: ELF.h:169
llvm::ELF::EM_RISCV
@ EM_RISCV
Definition: ELF.h:318
llvm::ELF::EM_UNICORE
@ EM_UNICORE
Definition: ELF.h:228
llvm::ELF::EM_PPC64
@ EM_PPC64
Definition: ELF.h:150
llvm::ELF::EM_NS32K
@ EM_NS32K
Definition: ELF.h:215
llvm::ELF::EM_TRICORE
@ EM_TRICORE
Definition: ELF.h:161
llvm::ELF::EM_VIDEOCORE3
@ EM_VIDEOCORE3
Definition: ELF.h:248
llvm::ELF::EM_C166
@ EM_C166
Definition: ELF.h:235
llvm::ELF::EM_CRAYNV2
@ EM_CRAYNV2
Definition: ELF.h:269
llvm::ELF::EM_DSPIC30F
@ EM_DSPIC30F
Definition: ELF.h:237
Error.h
llvm::ELF::EM_SH
@ EM_SH
Definition: ELF.h:159
llvm::ELF::EM_68HC16
@ EM_68HC16
Definition: ELF.h:186
llvm::ELF::EM_FR30
@ EM_FR30
Definition: ELF.h:201
DenseMap.h
llvm::ELF::EM_H8_500
@ EM_H8_500
Definition: ELF.h:166
llvm::ELF::EM_M16C
@ EM_M16C
Definition: ELF.h:236
llvm::ELF::EM_H8_300
@ EM_H8_300
Definition: ELF.h:163
llvm::ELF::EM_PCP
@ EM_PCP
Definition: ELF.h:172
llvm::ELF::EM_AVR32
@ EM_AVR32
Definition: ELF.h:282
llvm::ELF::EM_CSKY
@ EM_CSKY
Definition: ELF.h:322
llvm::ELF::EM_CSR_KALIMBA
@ EM_CSR_KALIMBA
Definition: ELF.h:316
llvm::ELF::EM_TMM_GPP
@ EM_TMM_GPP
Definition: ELF.h:214
llvm::ELF::EM_88K
@ EM_88K
Definition: ELF.h:139
llvm::ELF::EM_TI_C6000
@ EM_TI_C6000
Definition: ELF.h:251
llvm::ELF::EM_PRISM
@ EM_PRISM
Definition: ELF.h:199
llvm::ELF::EM_MAX
@ EM_MAX
Definition: ELF.h:220
llvm::ELF::EM_MANIK
@ EM_MANIK
Definition: ELF.h:268
llvm::ELF::EM_HEXAGON
@ EM_HEXAGON
Definition: ELF.h:258
llvm::ELF::EM_VAX
@ EM_VAX
Definition: ELF.h:192
llvm::ELF::EM_RCE
@ EM_RCE
Definition: ELF.h:156
llvm::ELF::EM_IA_64
@ EM_IA_64
Definition: ELF.h:167
llvm::ELF::EM_CDP
@ EM_CDP
Definition: ELF.h:312
llvm::ELF::EM_ST100
@ EM_ST100
Definition: ELF.h:177
llvm::ELF::EM_KMX32
@ EM_KMX32
Definition: ELF.h:308
llvm::ELF::EM_PDP10
@ EM_PDP10
Definition: ELF.h:181
llvm::ELF::EM_KVARC
@ EM_KVARC
Definition: ELF.h:311
llvm::ELF::EM_SLE9X
@ EM_SLE9X
Definition: ELF.h:278
llvm::ELF::EM_NONE
@ EM_NONE
Definition: ELF.h:134
llvm::ELF::EM_FR20
@ EM_FR20
Definition: ELF.h:154
llvm::ELF::EM_PJ
@ EM_PJ
Definition: ELF.h:208
ELF.h
llvm::ELF::EM_ALTERA_NIOS2
@ EM_ALTERA_NIOS2
Definition: ELF.h:232
llvm::ELF::EM_RS08
@ EM_RS08
Definition: ELF.h:242
llvm::ELF::EM_ME16
@ EM_ME16
Definition: ELF.h:176
llvm::ELF::EM_56800EX
@ EM_56800EX
Definition: ELF.h:297
llvm::ELF::EM_RL78
@ EM_RL78
Definition: ELF.h:294
llvm::ELF::EM_PDP11
@ EM_PDP11
Definition: ELF.h:182
llvm::ELF::EM_INTEL209
@ EM_INTEL209
Definition: ELF.h:306
llvm::ELF::EM_TRIMEDIA
@ EM_TRIMEDIA
Definition: ELF.h:257
llvm::ELF::EM_MIPS
@ EM_MIPS
Definition: ELF.h:142
llvm::ELF::EM_TINYJ
@ EM_TINYJ
Definition: ELF.h:178
llvm::ELF::EM_FX66
@ EM_FX66
Definition: ELF.h:183
llvm::ELF::EM_MAXQ30
@ EM_MAXQ30
Definition: ELF.h:266
llvm::ELF::EM_ST9PLUS
@ EM_ST9PLUS
Definition: ELF.h:184
llvm::ELF::EM_F2MC16
@ EM_F2MC16
Definition: ELF.h:222
llvm::ELF::EM_VE
@ EM_VE
Definition: ELF.h:321
llvm::ELF::EM_STARCORE
@ EM_STARCORE
Definition: ELF.h:175
llvm::ELF::EM_68K
@ EM_68K
Definition: ELF.h:138
llvm::ELF::EM_RH32
@ EM_RH32
Definition: ELF.h:155
llvm::ELF::EM_MMDSP_PLUS
@ EM_MMDSP_PLUS
Definition: ELF.h:254
llvm::ELF::EM_SNP1K
@ EM_SNP1K
Definition: ELF.h:217
llvm::ELF::EM_M32
@ EM_M32
Definition: ELF.h:135
llvm::ELF::EM_M32R
@ EM_M32R
Definition: ELF.h:205
llvm::ELF::EM_K10M
@ EM_K10M
Definition: ELF.h:280
llvm::ELF::EM_JAVELIN
@ EM_JAVELIN
Definition: ELF.h:194
llvm::ELF::EM_SEP
@ EM_SEP
Definition: ELF.h:226
llvm::ELF::EM_SHARC
@ EM_SHARC
Definition: ELF.h:243
llvm::ELF::EM_TPC
@ EM_TPC
Definition: ELF.h:216
llvm::ELF::EM_MIPS_RS3_LE
@ EM_MIPS_RS3_LE
Definition: ELF.h:144
llvm::ELF::EM_PPC
@ EM_PPC
Definition: ELF.h:149
llvm::ELF::EM_960
@ EM_960
Definition: ELF.h:148
llvm::ELF::EM_ALPHA
@ EM_ALPHA
Definition: ELF.h:158
llvm::ELF::EM_RX
@ EM_RX
Definition: ELF.h:270
llvm::ELF::EM_PDSP
@ EM_PDSP
Definition: ELF.h:180
llvm::ELF::EM_SPARC32PLUS
@ EM_SPARC32PLUS
Definition: ELF.h:147
llvm::ELF::EM_CUDA
@ EM_CUDA
Definition: ELF.h:287
llvm::ELF::EM_H8S
@ EM_H8S
Definition: ELF.h:165
llvm::ELF::EM_KMX16
@ EM_KMX16
Definition: ELF.h:309
llvm::ELF::EM_68HC08
@ EM_68HC08
Definition: ELF.h:188
llvm::ELF::EM_COOL
@ EM_COOL
Definition: ELF.h:314
llvm::ELF::EM_68HC11
@ EM_68HC11
Definition: ELF.h:187
llvm::StringRef::lower
LLVM_NODISCARD std::string lower() const
Definition: StringRef.cpp:105
llvm::ELF::EM_DSP24
@ EM_DSP24
Definition: ELF.h:247
llvm::ELF::EM_XGATE
@ EM_XGATE
Definition: ELF.h:234
llvm::ELF::EM_LANAI
@ EM_LANAI
Definition: ELF.h:319
llvm::ELF::EM_ECOG1X
@ EM_ECOG1X
Definition: ELF.h:265
llvm::ELF::EM_SE_C17
@ EM_SE_C17
Definition: ELF.h:250
llvm::ELF::EM_CR16
@ EM_CR16
Definition: ELF.h:275
llvm::ELF::EM_ST19
@ EM_ST19
Definition: ELF.h:191
llvm::ELF::EM_BPF
@ EM_BPF
Definition: ELF.h:320
llvm::ELF::EM_R32C
@ EM_R32C
Definition: ELF.h:256
llvm::ELF::EM_TILEPRO
@ EM_TILEPRO
Definition: ELF.h:285
llvm::ELF::EM_SVX
@ EM_SVX
Definition: ELF.h:190
llvm::ELF::EM_AMDGPU
@ EM_AMDGPU
Definition: ELF.h:317
llvm::ELF::EM_MSP430
@ EM_MSP430
Definition: ELF.h:223
llvm::ELF::EM_ECOG2
@ EM_ECOG2
Definition: ELF.h:245
llvm::ELF::EM_INTEL207
@ EM_INTEL207
Definition: ELF.h:304
llvm::ELF::EM_ETPU
@ EM_ETPU
Definition: ELF.h:277
llvm::ELF::EM_ARC_COMPACT2
@ EM_ARC_COMPACT2
Definition: ELF.h:292
llvm::ELF::EM_EXCESS
@ EM_EXCESS
Definition: ELF.h:230
llvm::ELF::EM_CYPRESS_M8C
@ EM_CYPRESS_M8C
Definition: ELF.h:255
llvm::ELF::EM_BLACKFIN
@ EM_BLACKFIN
Definition: ELF.h:224
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::ELF::EM_68HC05
@ EM_68HC05
Definition: ELF.h:189
llvm::ELF::EM_CE
@ EM_CE
Definition: ELF.h:239
llvm::ELF::EM_ZSP
@ EM_ZSP
Definition: ELF.h:196
llvm::ELF::EM_INTEL206
@ EM_INTEL206
Definition: ELF.h:303
llvm::ELF::EM_TI_C2000
@ EM_TI_C2000
Definition: ELF.h:252
llvm::ELF::EM_FIREPATH
@ EM_FIREPATH
Definition: ELF.h:195
llvm::ELF::EM_LATTICEMICO32
@ EM_LATTICEMICO32
Definition: ELF.h:249
llvm::ELF::EM_SCORE7
@ EM_SCORE7
Definition: ELF.h:246
llvm::ELF::EM_ECOG1
@ EM_ECOG1
Definition: ELF.h:264
llvm::ELF::EM_INTEL208
@ EM_INTEL208
Definition: ELF.h:305
llvm::ELF::EM_BA1
@ EM_BA1
Definition: ELF.h:298
llvm::ELF::EM_TILE64
@ EM_TILE64
Definition: ELF.h:284
llvm::ELF::EM_NDS32
@ EM_NDS32
Definition: ELF.h:262
llvm::ELF::EM_KM32
@ EM_KM32
Definition: ELF.h:307
llvm::ELF::EM_DXP
@ EM_DXP
Definition: ELF.h:231
llvm::ELF::EM_TSK3000
@ EM_TSK3000
Definition: ELF.h:241
llvm::ELF::EM_XTENSA
@ EM_XTENSA
Definition: ELF.h:212
llvm::ELF::EM_KMX8
@ EM_KMX8
Definition: ELF.h:310
llvm::ELF::EM_S370
@ EM_S370
Definition: ELF.h:143
llvm::ELF::EM_SE_C33
@ EM_SE_C33
Definition: ELF.h:225
llvm::ELF::EM_NCPU
@ EM_NCPU
Definition: ELF.h:173
uint16_t
llvm::ELF::EM_CRX
@ EM_CRX
Definition: ELF.h:233
llvm::ELF::convertEMachineToArchName
StringRef convertEMachineToArchName(uint16_t EMachine)
Convert an ELF's e_machine value into an architecture name.
Definition: ELF.cpp:205
llvm::ELF::EM_MCHP_PIC
@ EM_MCHP_PIC
Definition: ELF.h:301
llvm::ELF::EM_V800
@ EM_V800
Definition: ELF.h:153
llvm::ELF::EM_ARC_COMPACT
@ EM_ARC_COMPACT
Definition: ELF.h:210
llvm::ELF::EM_ST7
@ EM_ST7
Definition: ELF.h:185
StringSwitch.h
llvm::ELF::EM_HUANY
@ EM_HUANY
Definition: ELF.h:198
llvm::ELF::EM_ST200
@ EM_ST200
Definition: ELF.h:218
llvm::ELF::EM_78KOR
@ EM_78KOR
Definition: ELF.h:296
llvm::ELF::EM_ARCA
@ EM_ARCA
Definition: ELF.h:227
llvm::ELF::EM_COGE
@ EM_COGE
Definition: ELF.h:313
llvm::ELF::EM_COREA_2ND
@ EM_COREA_2ND
Definition: ELF.h:291
llvm::ELF::EM_8051
@ EM_8051
Definition: ELF.h:259
llvm::ELF::EM_OPEN8
@ EM_OPEN8
Definition: ELF.h:293
llvm::ELF::EM_V850
@ EM_V850
Definition: ELF.h:204
llvm::ELF::EM_IP2K
@ EM_IP2K
Definition: ELF.h:219
llvm::ELF::EM_VIDEOCORE5
@ EM_VIDEOCORE5
Definition: ELF.h:295
llvm::ELF::EM_CRIS
@ EM_CRIS
Definition: ELF.h:193
llvm::ELF::EM_X86_64
@ EM_X86_64
Definition: ELF.h:179
llvm::ELF::EM_AVR
@ EM_AVR
Definition: ELF.h:200
llvm::ELF::EM_TILEGX
@ EM_TILEGX
Definition: ELF.h:288
llvm::ELF::EM_D30V
@ EM_D30V
Definition: ELF.h:203
llvm::StringSwitch
A switch()-like statement whose cases are string literals.
Definition: StringSwitch.h:42
llvm::ELF::EM_VIDEOCORE
@ EM_VIDEOCORE
Definition: ELF.h:213
llvm::ELF::EM_IAMCU
@ EM_IAMCU
Definition: ELF.h:140
llvm::ELF::EM_ECOG16
@ EM_ECOG16
Definition: ELF.h:274
llvm::ELF::EM_MN10200
@ EM_MN10200
Definition: ELF.h:207
llvm::ELF::EM_STXP7X
@ EM_STXP7X
Definition: ELF.h:260
llvm::ELF::EM_68HC12
@ EM_68HC12
Definition: ELF.h:170
llvm::ELF::convertArchNameToEMachine
uint16_t convertArchNameToEMachine(StringRef Arch)
Convert an architecture name into ELF's e_machine value.
Definition: ELF.cpp:18
llvm::ELF::EM_XIMO16
@ EM_XIMO16
Definition: ELF.h:267
llvm::ELF::EM_COREA_1ST
@ EM_COREA_1ST
Definition: ELF.h:290
llvm::ELF::EM_MMIX
@ EM_MMIX
Definition: ELF.h:197
llvm::ELF::EM_386
@ EM_386
Definition: ELF.h:137
llvm::ELF::EM_SPARCV9
@ EM_SPARCV9
Definition: ELF.h:160
llvm::ELF::EM_MCST_ELBRUS
@ EM_MCST_ELBRUS
Definition: ELF.h:273
llvm::ELF::EM_NDR1
@ EM_NDR1
Definition: ELF.h:174
llvm::ELF::EM_PARISC
@ EM_PARISC
Definition: ELF.h:145
llvm::ELF::EM_SPU
@ EM_SPU
Definition: ELF.h:152
llvm::ELF::EM_MIPS_X
@ EM_MIPS_X
Definition: ELF.h:168
llvm::ELF::EM_CR
@ EM_CR
Definition: ELF.h:221