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