LLVM  10.0.0svn
ELFYAML.h
Go to the documentation of this file.
1 //===- ELFYAML.h - ELF YAMLIO implementation --------------------*- 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 ///
9 /// \file
10 /// This file declares classes for handling the YAML representation
11 /// of ELF.
12 ///
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_OBJECTYAML_ELFYAML_H
16 #define LLVM_OBJECTYAML_ELFYAML_H
17 
18 #include "llvm/ADT/StringRef.h"
19 #include "llvm/ObjectYAML/YAML.h"
21 #include <cstdint>
22 #include <memory>
23 #include <vector>
24 
25 namespace llvm {
26 namespace ELFYAML {
27 
29 
30 // These types are invariant across 32/64-bit ELF, so for simplicity just
31 // directly give them their exact sizes. We don't need to worry about
32 // endianness because these are just the types in the YAMLIO structures,
33 // and are appropriately converted to the necessary endianness when
34 // reading/generating binary object files.
35 // The naming of these types is intended to be ELF_PREFIX, where PREFIX is
36 // the common prefix of the respective constants. E.g. ELF_EM corresponds
37 // to the `e_machine` constants, like `EM_X86_64`.
38 // In the future, these would probably be better suited by C++11 enum
39 // class's with appropriate fixed underlying type.
40 LLVM_YAML_STRONG_TYPEDEF(uint16_t, ELF_ET)
41 LLVM_YAML_STRONG_TYPEDEF(uint32_t, ELF_PT)
42 LLVM_YAML_STRONG_TYPEDEF(uint32_t, ELF_EM)
43 LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_ELFCLASS)
44 LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_ELFDATA)
45 LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_ELFOSABI)
46 // Just use 64, since it can hold 32-bit values too.
47 LLVM_YAML_STRONG_TYPEDEF(uint64_t, ELF_EF)
48 // Just use 64, since it can hold 32-bit values too.
49 LLVM_YAML_STRONG_TYPEDEF(uint64_t, ELF_DYNTAG)
50 LLVM_YAML_STRONG_TYPEDEF(uint32_t, ELF_PF)
51 LLVM_YAML_STRONG_TYPEDEF(uint32_t, ELF_SHT)
52 LLVM_YAML_STRONG_TYPEDEF(uint32_t, ELF_REL)
53 LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_RSS)
54 // Just use 64, since it can hold 32-bit values too.
55 LLVM_YAML_STRONG_TYPEDEF(uint64_t, ELF_SHF)
56 LLVM_YAML_STRONG_TYPEDEF(uint16_t, ELF_SHN)
57 LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_STB)
58 LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_STT)
59 
60 LLVM_YAML_STRONG_TYPEDEF(uint8_t, MIPS_AFL_REG)
61 LLVM_YAML_STRONG_TYPEDEF(uint8_t, MIPS_ABI_FP)
62 LLVM_YAML_STRONG_TYPEDEF(uint32_t, MIPS_AFL_EXT)
63 LLVM_YAML_STRONG_TYPEDEF(uint32_t, MIPS_AFL_ASE)
64 LLVM_YAML_STRONG_TYPEDEF(uint32_t, MIPS_AFL_FLAGS1)
65 LLVM_YAML_STRONG_TYPEDEF(uint32_t, MIPS_ISA)
66 
67 // For now, hardcode 64 bits everywhere that 32 or 64 would be needed
68 // since 64-bit can hold 32-bit values too.
69 struct FileHeader {
70  ELF_ELFCLASS Class;
71  ELF_ELFDATA Data;
72  ELF_ELFOSABI OSABI;
73  llvm::yaml::Hex8 ABIVersion;
74  ELF_ET Type;
75  ELF_EM Machine;
76  ELF_EF Flags;
77  llvm::yaml::Hex64 Entry;
78 
83 };
84 
85 struct SectionName {
87 };
88 
89 struct ProgramHeader {
90  ELF_PT Type;
91  ELF_PF Flags;
92  llvm::yaml::Hex64 VAddr;
93  llvm::yaml::Hex64 PAddr;
98  std::vector<SectionName> Sections;
99 };
100 
101 struct Symbol {
104  ELF_STT Type;
107  ELF_STB Binding;
108  llvm::yaml::Hex64 Value;
109  llvm::yaml::Hex64 Size;
111 };
112 
115 };
116 
117 struct DynamicEntry {
118  ELF_DYNTAG Tag;
119  llvm::yaml::Hex64 Val;
120 };
121 
123  llvm::yaml::Hex64 Address;
124  llvm::yaml::Hex64 Size;
125 };
126 
127 struct Section {
128  enum class SectionKind {
129  Dynamic,
130  Group,
131  RawContent,
132  Relocation,
133  NoBits,
134  Hash,
135  Verdef,
136  Verneed,
137  StackSizes,
139  Symver,
140  MipsABIFlags,
141  Addrsig
142  };
145  ELF_SHT Type;
147  llvm::yaml::Hex64 Address;
149  llvm::yaml::Hex64 AddressAlign;
151 
152  // Usually sections are not created implicitly, but loaded from YAML.
153  // When they are, this flag is used to signal about that.
155 
156  Section(SectionKind Kind, bool IsImplicit = false)
157  : Kind(Kind), IsImplicit(IsImplicit) {}
158  virtual ~Section();
159 
160  // The following members are used to override section fields which is
161  // useful for creating invalid objects.
162 
163  // This can be used to override the offset stored in the sh_name field.
164  // It does not affect the name stored in the string table.
166 
167  // This can be used to override the sh_offset field. It does not place the
168  // section data at the offset specified.
170 
171  // This can be used to override the sh_size field. It does not affect the
172  // content written.
174 };
175 
180 
182 
183  static bool classof(const Section *S) {
184  return S->Kind == SectionKind::StackSizes;
185  }
186 
187  static bool nameMatches(StringRef Name) {
188  return Name == ".stack_sizes";
189  }
190 };
191 
193  std::vector<DynamicEntry> Entries;
195 
197 
198  static bool classof(const Section *S) {
199  return S->Kind == SectionKind::Dynamic;
200  }
201 };
202 
207 
209 
210  static bool classof(const Section *S) {
211  return S->Kind == SectionKind::RawContent;
212  }
213 };
214 
216  llvm::yaml::Hex64 Size;
217 
219 
220  static bool classof(const Section *S) {
221  return S->Kind == SectionKind::NoBits;
222  }
223 };
224 
230 
232 
233  static bool classof(const Section *S) { return S->Kind == SectionKind::Hash; }
234 };
235 
236 struct VernauxEntry {
238  uint16_t Flags;
239  uint16_t Other;
241 };
242 
243 struct VerneedEntry {
244  uint16_t Version;
246  std::vector<VernauxEntry> AuxV;
247 };
248 
250  std::vector<VerneedEntry> VerneedV;
251  llvm::yaml::Hex64 Info;
252 
254 
255  static bool classof(const Section *S) {
256  return S->Kind == SectionKind::Verneed;
257  }
258 };
259 
262  AddrsigSymbol(llvm::yaml::Hex32 Ndx) : Name(None), Index(Ndx) {}
264 
267 };
268 
273 
275  static bool classof(const Section *S) {
276  return S->Kind == SectionKind::Addrsig;
277  }
278 };
279 
281  std::vector<uint16_t> Entries;
282 
284 
285  static bool classof(const Section *S) {
286  return S->Kind == SectionKind::Symver;
287  }
288 };
289 
290 struct VerdefEntry {
291  uint16_t Version;
292  uint16_t Flags;
293  uint16_t VersionNdx;
295  std::vector<StringRef> VerNames;
296 };
297 
299  std::vector<VerdefEntry> Entries;
300  llvm::yaml::Hex64 Info;
301 
303 
304  static bool classof(const Section *S) {
305  return S->Kind == SectionKind::Verdef;
306  }
307 };
308 
309 struct Group : Section {
310  // Members of a group contain a flag and a list of section indices
311  // that are part of the group.
312  std::vector<SectionOrType> Members;
313  StringRef Signature; /* Info */
314 
316 
317  static bool classof(const Section *S) {
318  return S->Kind == SectionKind::Group;
319  }
320 };
321 
322 struct Relocation {
323  llvm::yaml::Hex64 Offset;
324  int64_t Addend;
325  ELF_REL Type;
327 };
328 
330  std::vector<Relocation> Relocations;
332 
334 
335  static bool classof(const Section *S) {
336  return S->Kind == SectionKind::Relocation;
337  }
338 };
339 
341  std::vector<uint32_t> Entries;
342 
344 
345  static bool classof(const Section *S) {
346  return S->Kind == SectionKind::SymtabShndxSection;
347  }
348 };
349 
350 // Represents .MIPS.abiflags section
352  llvm::yaml::Hex16 Version;
353  MIPS_ISA ISALevel;
354  llvm::yaml::Hex8 ISARevision;
355  MIPS_AFL_REG GPRSize;
356  MIPS_AFL_REG CPR1Size;
357  MIPS_AFL_REG CPR2Size;
358  MIPS_ABI_FP FpABI;
359  MIPS_AFL_EXT ISAExtension;
360  MIPS_AFL_ASE ASEs;
361  MIPS_AFL_FLAGS1 Flags1;
362  llvm::yaml::Hex32 Flags2;
363 
365 
366  static bool classof(const Section *S) {
367  return S->Kind == SectionKind::MipsABIFlags;
368  }
369 };
370 
371 struct Object {
373  std::vector<ProgramHeader> ProgramHeaders;
374  std::vector<std::unique_ptr<Section>> Sections;
375  // Although in reality the symbols reside in a section, it is a lot
376  // cleaner and nicer if we read them from the YAML as a separate
377  // top-level key, which automatically ensures that invariants like there
378  // being a single SHT_SYMTAB section are upheld.
380  std::vector<Symbol> DynamicSymbols;
381 };
382 
383 } // end namespace ELFYAML
384 } // end namespace llvm
385 
386 LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::AddrsigSymbol)
387 LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::StackSizeEntry)
388 LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::DynamicEntry)
389 LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::ProgramHeader)
390 LLVM_YAML_IS_SEQUENCE_VECTOR(std::unique_ptr<llvm::ELFYAML::Section>)
391 LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::Symbol)
392 LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::VerdefEntry)
393 LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::VernauxEntry)
394 LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::VerneedEntry)
395 LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::Relocation)
396 LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::SectionOrType)
397 LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::SectionName)
398 
399 namespace llvm {
400 namespace yaml {
401 
402 template <>
403 struct ScalarEnumerationTraits<ELFYAML::ELF_ET> {
404  static void enumeration(IO &IO, ELFYAML::ELF_ET &Value);
405 };
406 
407 template <> struct ScalarEnumerationTraits<ELFYAML::ELF_PT> {
408  static void enumeration(IO &IO, ELFYAML::ELF_PT &Value);
409 };
410 
411 template <>
412 struct ScalarEnumerationTraits<ELFYAML::ELF_EM> {
413  static void enumeration(IO &IO, ELFYAML::ELF_EM &Value);
414 };
415 
416 template <>
417 struct ScalarEnumerationTraits<ELFYAML::ELF_ELFCLASS> {
418  static void enumeration(IO &IO, ELFYAML::ELF_ELFCLASS &Value);
419 };
420 
421 template <>
422 struct ScalarEnumerationTraits<ELFYAML::ELF_ELFDATA> {
423  static void enumeration(IO &IO, ELFYAML::ELF_ELFDATA &Value);
424 };
425 
426 template <>
427 struct ScalarEnumerationTraits<ELFYAML::ELF_ELFOSABI> {
428  static void enumeration(IO &IO, ELFYAML::ELF_ELFOSABI &Value);
429 };
430 
431 template <>
432 struct ScalarBitSetTraits<ELFYAML::ELF_EF> {
433  static void bitset(IO &IO, ELFYAML::ELF_EF &Value);
434 };
435 
436 template <> struct ScalarBitSetTraits<ELFYAML::ELF_PF> {
437  static void bitset(IO &IO, ELFYAML::ELF_PF &Value);
438 };
439 
440 template <>
441 struct ScalarEnumerationTraits<ELFYAML::ELF_SHT> {
442  static void enumeration(IO &IO, ELFYAML::ELF_SHT &Value);
443 };
444 
445 template <>
446 struct ScalarBitSetTraits<ELFYAML::ELF_SHF> {
447  static void bitset(IO &IO, ELFYAML::ELF_SHF &Value);
448 };
449 
450 template <> struct ScalarEnumerationTraits<ELFYAML::ELF_SHN> {
451  static void enumeration(IO &IO, ELFYAML::ELF_SHN &Value);
452 };
453 
454 template <> struct ScalarEnumerationTraits<ELFYAML::ELF_STB> {
455  static void enumeration(IO &IO, ELFYAML::ELF_STB &Value);
456 };
457 
458 template <>
459 struct ScalarEnumerationTraits<ELFYAML::ELF_STT> {
460  static void enumeration(IO &IO, ELFYAML::ELF_STT &Value);
461 };
462 
463 template <>
464 struct ScalarEnumerationTraits<ELFYAML::ELF_REL> {
465  static void enumeration(IO &IO, ELFYAML::ELF_REL &Value);
466 };
467 
468 template <>
469 struct ScalarEnumerationTraits<ELFYAML::ELF_DYNTAG> {
470  static void enumeration(IO &IO, ELFYAML::ELF_DYNTAG &Value);
471 };
472 
473 template <>
474 struct ScalarEnumerationTraits<ELFYAML::ELF_RSS> {
475  static void enumeration(IO &IO, ELFYAML::ELF_RSS &Value);
476 };
477 
478 template <>
479 struct ScalarEnumerationTraits<ELFYAML::MIPS_AFL_REG> {
480  static void enumeration(IO &IO, ELFYAML::MIPS_AFL_REG &Value);
481 };
482 
483 template <>
484 struct ScalarEnumerationTraits<ELFYAML::MIPS_ABI_FP> {
485  static void enumeration(IO &IO, ELFYAML::MIPS_ABI_FP &Value);
486 };
487 
488 template <>
489 struct ScalarEnumerationTraits<ELFYAML::MIPS_AFL_EXT> {
490  static void enumeration(IO &IO, ELFYAML::MIPS_AFL_EXT &Value);
491 };
492 
493 template <>
494 struct ScalarEnumerationTraits<ELFYAML::MIPS_ISA> {
495  static void enumeration(IO &IO, ELFYAML::MIPS_ISA &Value);
496 };
497 
498 template <>
499 struct ScalarBitSetTraits<ELFYAML::MIPS_AFL_ASE> {
500  static void bitset(IO &IO, ELFYAML::MIPS_AFL_ASE &Value);
501 };
502 
503 template <>
504 struct ScalarBitSetTraits<ELFYAML::MIPS_AFL_FLAGS1> {
505  static void bitset(IO &IO, ELFYAML::MIPS_AFL_FLAGS1 &Value);
506 };
507 
508 template <>
509 struct MappingTraits<ELFYAML::FileHeader> {
510  static void mapping(IO &IO, ELFYAML::FileHeader &FileHdr);
511 };
512 
513 template <> struct MappingTraits<ELFYAML::ProgramHeader> {
514  static void mapping(IO &IO, ELFYAML::ProgramHeader &FileHdr);
515 };
516 
517 template <>
518 struct MappingTraits<ELFYAML::Symbol> {
519  static void mapping(IO &IO, ELFYAML::Symbol &Symbol);
520  static StringRef validate(IO &IO, ELFYAML::Symbol &Symbol);
521 };
522 
523 template <> struct MappingTraits<ELFYAML::StackSizeEntry> {
524  static void mapping(IO &IO, ELFYAML::StackSizeEntry &Rel);
525 };
526 
527 template <> struct MappingTraits<ELFYAML::DynamicEntry> {
528  static void mapping(IO &IO, ELFYAML::DynamicEntry &Rel);
529 };
530 
531 template <> struct MappingTraits<ELFYAML::VerdefEntry> {
532  static void mapping(IO &IO, ELFYAML::VerdefEntry &E);
533 };
534 
535 template <> struct MappingTraits<ELFYAML::VerneedEntry> {
536  static void mapping(IO &IO, ELFYAML::VerneedEntry &E);
537 };
538 
539 template <> struct MappingTraits<ELFYAML::VernauxEntry> {
540  static void mapping(IO &IO, ELFYAML::VernauxEntry &E);
541 };
542 
543 template <> struct MappingTraits<ELFYAML::AddrsigSymbol> {
544  static void mapping(IO &IO, ELFYAML::AddrsigSymbol &Sym);
545 };
546 
547 template <> struct MappingTraits<ELFYAML::Relocation> {
548  static void mapping(IO &IO, ELFYAML::Relocation &Rel);
549 };
550 
551 template <>
552 struct MappingTraits<std::unique_ptr<ELFYAML::Section>> {
553  static void mapping(IO &IO, std::unique_ptr<ELFYAML::Section> &Section);
554  static StringRef validate(IO &io, std::unique_ptr<ELFYAML::Section> &Section);
555 };
556 
557 template <>
558 struct MappingTraits<ELFYAML::Object> {
559  static void mapping(IO &IO, ELFYAML::Object &Object);
560 };
561 
562 template <> struct MappingTraits<ELFYAML::SectionOrType> {
563  static void mapping(IO &IO, ELFYAML::SectionOrType &sectionOrType);
564 };
565 
566 template <> struct MappingTraits<ELFYAML::SectionName> {
567  static void mapping(IO &IO, ELFYAML::SectionName &sectionName);
568 };
569 
570 } // end namespace yaml
571 } // end namespace llvm
572 
573 #endif // LLVM_OBJECTYAML_ELFYAML_H
const NoneType None
Definition: None.h:23
static bool classof(const Section *S)
Definition: ELFYAML.h:198
static bool classof(const Section *S)
Definition: ELFYAML.h:220
Optional< ELF_SHF > Flags
Definition: ELFYAML.h:146
Optional< llvm::yaml::Hex64 > Size
Definition: ELFYAML.h:271
This class represents lattice values for constants.
Definition: AllocatorList.h:23
static bool classof(const Section *S)
Definition: ELFYAML.h:345
Optional< yaml::BinaryRef > Content
Definition: ELFYAML.h:177
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
static bool classof(const Section *S)
Definition: ELFYAML.h:317
Optional< llvm::yaml::Hex64 > Align
Definition: ELFYAML.h:94
static bool classof(const Section *S)
Definition: ELFYAML.h:304
Optional< ELF_SHN > Index
Definition: ELFYAML.h:106
Optional< llvm::yaml::Hex64 > Size
Definition: ELFYAML.h:178
llvm::yaml::Hex64 PAddr
Definition: ELFYAML.h:93
std::vector< SectionName > Sections
Definition: ELFYAML.h:98
llvm::yaml::Hex16 Version
Definition: ELFYAML.h:352
Optional< llvm::yaml::Hex64 > Size
Definition: ELFYAML.h:205
llvm::yaml::Hex64 Info
Definition: ELFYAML.h:300
llvm::yaml::Hex64 Address
Definition: ELFYAML.h:147
FileHeader Header
Definition: ELFYAML.h:372
llvm::yaml::Hex64 Entry
Definition: ELFYAML.h:77
Optional< llvm::yaml::Hex64 > Size
Definition: ELFYAML.h:227
llvm::yaml::Hex64 AddressAlign
Definition: ELFYAML.h:149
Optional< llvm::yaml::Hex32 > Index
Definition: ELFYAML.h:266
llvm::yaml::Hex64 Size
Definition: ELFYAML.h:216
std::vector< DynamicEntry > Entries
Definition: ELFYAML.h:193
Definition: BitVector.h:937
Optional< std::vector< StackSizeEntry > > Entries
Definition: ELFYAML.h:179
StringRef Section
Definition: ELFYAML.h:105
static bool classof(const Section *S)
Definition: ELFYAML.h:335
llvm::yaml::Hex64 Size
Definition: ELFYAML.h:109
Optional< std::vector< uint32_t > > Chain
Definition: ELFYAML.h:229
llvm::yaml::Hex8 ABIVersion
Definition: ELFYAML.h:73
llvm::yaml::Hex64 Info
Definition: ELFYAML.h:251
Optional< llvm::yaml::Hex64 > EntSize
Definition: ELFYAML.h:150
Optional< uint8_t > Other
Definition: ELFYAML.h:110
Optional< llvm::yaml::Hex64 > ShSize
Definition: ELFYAML.h:173
std::vector< ProgramHeader > ProgramHeaders
Definition: ELFYAML.h:373
Optional< std::vector< Symbol > > Symbols
Definition: ELFYAML.h:379
std::vector< VernauxEntry > AuxV
Definition: ELFYAML.h:246
static bool classof(const Section *S)
Definition: ELFYAML.h:233
Optional< llvm::yaml::Hex16 > SHStrNdx
Definition: ELFYAML.h:82
llvm::yaml::Hex32 Flags2
Definition: ELFYAML.h:362
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
std::vector< uint32_t > Entries
Definition: ELFYAML.h:341
Optional< llvm::yaml::Hex64 > SHOff
Definition: ELFYAML.h:80
std::vector< VerneedEntry > VerneedV
Definition: ELFYAML.h:250
std::vector< StringRef > VerNames
Definition: ELFYAML.h:295
StringRef Signature
Definition: ELFYAML.h:313
static bool classof(const Section *S)
Definition: ELFYAML.h:275
std::vector< std::unique_ptr< Section > > Sections
Definition: ELFYAML.h:374
AddrsigSymbol(llvm::yaml::Hex32 Ndx)
Definition: ELFYAML.h:262
Optional< yaml::BinaryRef > Content
Definition: ELFYAML.h:204
Section(SectionKind Kind, bool IsImplicit=false)
Definition: ELFYAML.h:156
Optional< yaml::BinaryRef > Content
Definition: ELFYAML.h:194
AddrsigSymbol(StringRef N)
Definition: ELFYAML.h:261
llvm::yaml::Hex8 ISARevision
Definition: ELFYAML.h:354
Optional< llvm::yaml::Hex64 > MemSize
Definition: ELFYAML.h:96
StringRef dropUniqueSuffix(StringRef S)
Definition: ELFEmitter.cpp:361
ELF_ELFCLASS Class
Definition: ELFYAML.h:70
std::vector< SectionOrType > Members
Definition: ELFYAML.h:312
Optional< llvm::yaml::Hex64 > ShOffset
Definition: ELFYAML.h:169
SectionKind Kind
Definition: ELFYAML.h:143
Optional< StringRef > Name
Definition: ELFYAML.h:265
static bool nameMatches(StringRef Name)
Definition: ELFYAML.h:187
llvm::yaml::Hex64 Offset
Definition: ELFYAML.h:323
std::vector< Symbol > DynamicSymbols
Definition: ELFYAML.h:380
static bool classof(const Section *S)
Definition: ELFYAML.h:255
Optional< llvm::yaml::Hex16 > SHNum
Definition: ELFYAML.h:81
Optional< llvm::yaml::Hex64 > Info
Definition: ELFYAML.h:206
static bool classof(const Section *S)
Definition: ELFYAML.h:285
Optional< llvm::yaml::Hex64 > ShName
Definition: ELFYAML.h:165
static bool classof(const Section *S)
Definition: ELFYAML.h:366
llvm::yaml::Hex64 Address
Definition: ELFYAML.h:123
MIPS_AFL_EXT ISAExtension
Definition: ELFYAML.h:359
Optional< std::vector< uint32_t > > Bucket
Definition: ELFYAML.h:228
#define N
llvm::yaml::Hex64 Value
Definition: ELFYAML.h:108
Optional< std::vector< AddrsigSymbol > > Symbols
Definition: ELFYAML.h:272
Optional< yaml::BinaryRef > Content
Definition: ELFYAML.h:270
Optional< llvm::yaml::Hex64 > FileSize
Definition: ELFYAML.h:95
std::vector< VerdefEntry > Entries
Definition: ELFYAML.h:299
Optional< llvm::yaml::Hex16 > SHEntSize
Definition: ELFYAML.h:79
Optional< uint32_t > NameIndex
Definition: ELFYAML.h:103
MIPS_AFL_FLAGS1 Flags1
Definition: ELFYAML.h:361
LLVM Value Representation.
Definition: Value.h:74
static bool classof(const Section *S)
Definition: ELFYAML.h:210
llvm::yaml::Hex64 Val
Definition: ELFYAML.h:119
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:48
Optional< yaml::BinaryRef > Content
Definition: ELFYAML.h:226
std::vector< uint16_t > Entries
Definition: ELFYAML.h:281
ELF_ELFOSABI OSABI
Definition: ELFYAML.h:72
llvm::yaml::Hex64 VAddr
Definition: ELFYAML.h:92
Optional< StringRef > Symbol
Definition: ELFYAML.h:326
llvm::yaml::Hex64 Size
Definition: ELFYAML.h:124
static bool classof(const Section *S)
Definition: ELFYAML.h:183
std::vector< Relocation > Relocations
Definition: ELFYAML.h:330
void validate(const Triple &TT, const FeatureBitset &FeatureBits)
Optional< llvm::yaml::Hex64 > Offset
Definition: ELFYAML.h:97