Lines Matching defs:IO
47 IO &IO, ELFYAML::ELF_ET &Value) {
48 #define ECase(X) IO.enumCase(Value, #X, ELF::X)
55 IO.enumFallback<Hex16>(Value);
59 IO &IO, ELFYAML::ELF_PT &Value) {
60 #define ECase(X) IO.enumCase(Value, #X, ELF::X)
74 IO.enumFallback<Hex32>(Value);
78 IO &IO, ELFYAML::ELF_NT &Value) {
79 #define ECase(X) IO.enumCase(Value, #X, ELF::X)
192 IO.enumFallback<Hex32>(Value);
196 IO &IO, ELFYAML::ELF_EM &Value) {
197 #define ECase(X) IO.enumCase(Value, #X, ELF::X)
362 IO.enumFallback<Hex16>(Value);
366 IO &IO, ELFYAML::ELF_ELFCLASS &Value) {
367 #define ECase(X) IO.enumCase(Value, #X, ELF::X)
376 IO &IO, ELFYAML::ELF_ELFDATA &Value) {
377 #define ECase(X) IO.enumCase(Value, #X, ELF::X)
387 IO &IO, ELFYAML::ELF_ELFOSABI &Value) {
388 #define ECase(X) IO.enumCase(Value, #X, ELF::X)
416 IO.enumFallback<Hex8>(Value);
419 void ScalarBitSetTraits<ELFYAML::ELF_EF>::bitset(IO &IO,
421 const auto *Object = static_cast<ELFYAML::Object *>(IO.getContext());
422 assert(Object && "The IO context is not initialized");
423 #define BCase(X) IO.bitSetCase(Value, #X, ELF::X)
424 #define BCaseMask(X, M) IO.maskedBitSetCase(Value, #X, ELF::X, ELF::M)
655 IO.maskedBitSetCase(Value, Key.c_str(),
689 IO &IO, ELFYAML::ELF_SHT &Value) {
690 const auto *Object = static_cast<ELFYAML::Object *>(IO.getContext());
691 assert(Object && "The IO context is not initialized");
692 #define ECase(X) IO.enumCase(Value, #X, ELF::X)
770 IO.enumFallback<Hex32>(Value);
773 void ScalarBitSetTraits<ELFYAML::ELF_PF>::bitset(IO &IO,
775 #define BCase(X) IO.bitSetCase(Value, #X, ELF::X)
781 void ScalarBitSetTraits<ELFYAML::ELF_SHF>::bitset(IO &IO,
783 const auto *Object = static_cast<ELFYAML::Object *>(IO.getContext());
784 #define BCase(X) IO.bitSetCase(Value, #X, ELF::X)
833 IO &IO, ELFYAML::ELF_SHN &Value) {
834 const auto *Object = static_cast<ELFYAML::Object *>(IO.getContext());
835 assert(Object && "The IO context is not initialized");
836 #define ECase(X) IO.enumCase(Value, #X, ELF::X)
849 if (!IO.outputting() || Object->getMachine() == ELF::EM_MIPS) {
863 IO.enumFallback<Hex16>(Value);
867 IO &IO, ELFYAML::ELF_STB &Value) {
868 #define ECase(X) IO.enumCase(Value, #X, ELF::X)
874 IO.enumFallback<Hex8>(Value);
878 IO &IO, ELFYAML::ELF_STT &Value) {
879 #define ECase(X) IO.enumCase(Value, #X, ELF::X)
889 IO.enumFallback<Hex8>(Value);
894 IO &IO, ELFYAML::ELF_RSS &Value) {
895 #define ECase(X) IO.enumCase(Value, #X, ELF::X)
904 IO &IO, ELFYAML::ELF_REL &Value) {
905 const auto *Object = static_cast<ELFYAML::Object *>(IO.getContext());
906 assert(Object && "The IO context is not initialized");
907 #define ELF_RELOC(X, Y) IO.enumCase(Value, #X, ELF::X);
969 IO.enumFallback<Hex32>(Value);
973 IO &IO, ELFYAML::ELF_DYNTAG &Value) {
974 const auto *Object = static_cast<ELFYAML::Object *>(IO.getContext());
975 assert(Object && "The IO context is not initialized");
987 #define DYNAMIC_TAG(X, Y) IO.enumCase(Value, STRINGIFY(DT_##X), ELF::DT_##X);
1044 IO.enumFallback<Hex64>(Value);
1048 IO &IO, ELFYAML::MIPS_AFL_REG &Value) {
1049 #define ECase(X) IO.enumCase(Value, #X, Mips::AFL_##X)
1058 IO &IO, ELFYAML::MIPS_ABI_FP &Value) {
1059 #define ECase(X) IO.enumCase(Value, #X, Mips::Val_GNU_MIPS_ABI_##X)
1072 IO &IO, ELFYAML::MIPS_AFL_EXT &Value) {
1073 #define ECase(X) IO.enumCase(Value, #X, Mips::AFL_##X)
1098 IO &IO, ELFYAML::MIPS_ISA &Value) {
1099 IO.enumCase(Value, "MIPS1", 1);
1100 IO.enumCase(Value, "MIPS2", 2);
1101 IO.enumCase(Value, "MIPS3", 3);
1102 IO.enumCase(Value, "MIPS4", 4);
1103 IO.enumCase(Value, "MIPS5", 5);
1104 IO.enumCase(Value, "MIPS32", 32);
1105 IO.enumCase(Value, "MIPS64", 64);
1106 IO.enumFallback<Hex32>(Value);
1110 IO &IO, ELFYAML::MIPS_AFL_ASE &Value) {
1111 #define BCase(X) IO.bitSetCase(Value, #X, Mips::AFL_ASE_##X)
1131 IO &IO, ELFYAML::MIPS_AFL_FLAGS1 &Value) {
1132 #define BCase(X) IO.bitSetCase(Value, #X, Mips::AFL_FLAGS1_##X)
1138 IO &IO, ELFYAML::SectionHeader &SHdr) {
1139 IO.mapRequired("Name", SHdr.Name);
1142 void MappingTraits<ELFYAML::FileHeader>::mapping(IO &IO,
1144 IO.mapRequired("Class", FileHdr.Class);
1145 IO.mapRequired("Data", FileHdr.Data);
1146 IO.mapOptional("OSABI", FileHdr.OSABI, ELFYAML::ELF_ELFOSABI(0));
1147 IO.mapOptional("ABIVersion", FileHdr.ABIVersion, Hex8(0));
1148 IO.mapRequired("Type", FileHdr.Type);
1149 IO.mapOptional("Machine", FileHdr.Machine);
1150 IO.mapOptional("Flags", FileHdr.Flags, ELFYAML::ELF_EF(0));
1151 IO.mapOptional("Entry", FileHdr.Entry, Hex64(0));
1152 IO.mapOptional("SectionHeaderStringTable", FileHdr.SectionHeaderStringTable);
1155 assert(!IO.outputting() ||
1157 IO.mapOptional("EPhOff", FileHdr.EPhOff);
1158 IO.mapOptional("EPhEntSize", FileHdr.EPhEntSize);
1159 IO.mapOptional("EPhNum", FileHdr.EPhNum);
1160 IO.mapOptional("EShEntSize", FileHdr.EShEntSize);
1161 IO.mapOptional("EShOff", FileHdr.EShOff);
1162 IO.mapOptional("EShNum", FileHdr.EShNum);
1163 IO.mapOptional("EShStrNdx", FileHdr.EShStrNdx);
1167 IO &IO, ELFYAML::ProgramHeader &Phdr) {
1168 IO.mapRequired("Type", Phdr.Type);
1169 IO.mapOptional("Flags", Phdr.Flags, ELFYAML::ELF_PF(0));
1170 IO.mapOptional("FirstSec", Phdr.FirstSec);
1171 IO.mapOptional("LastSec", Phdr.LastSec);
1172 IO.mapOptional("VAddr", Phdr.VAddr, Hex64(0));
1173 IO.mapOptional("PAddr", Phdr.PAddr, Phdr.VAddr);
1174 IO.mapOptional("Align", Phdr.Align);
1175 IO.mapOptional("FileSize", Phdr.FileSize);
1176 IO.mapOptional("MemSize", Phdr.MemSize);
1177 IO.mapOptional("Offset", Phdr.Offset);
1181 IO &IO, ELFYAML::ProgramHeader &FileHdr) {
1226 NormalizedOther(IO &IO) : YamlIO(IO) {}
1227 NormalizedOther(IO &IO, std::optional<uint8_t> Original) : YamlIO(IO) {
1267 std::optional<uint8_t> denormalize(IO &) {
1314 IO &YamlIO;
1353 void MappingTraits<ELFYAML::Symbol>::mapping(IO &IO, ELFYAML::Symbol &Symbol) {
1354 IO.mapOptional("Name", Symbol.Name, StringRef());
1355 IO.mapOptional("StName", Symbol.StName);
1356 IO.mapOptional("Type", Symbol.Type, ELFYAML::ELF_STT(0));
1357 IO.mapOptional("Section", Symbol.Section);
1358 IO.mapOptional("Index", Symbol.Index);
1359 IO.mapOptional("Binding", Symbol.Binding, ELFYAML::ELF_STB(0));
1360 IO.mapOptional("Value", Symbol.Value);
1361 IO.mapOptional("Size", Symbol.Size);
1369 IO, Symbol.Other);
1370 IO.mapOptional("Other", Keys->Other);
1373 std::string MappingTraits<ELFYAML::Symbol>::validate(IO &IO,
1380 static void commonSectionMapping(IO &IO, ELFYAML::Section &Section) {
1381 IO.mapOptional("Name", Section.Name, StringRef());
1382 IO.mapRequired("Type", Section.Type);
1383 IO.mapOptional("Flags", Section.Flags);
1384 IO.mapOptional("Address", Section.Address);
1385 IO.mapOptional("Link", Section.Link);
1386 IO.mapOptional("AddressAlign", Section.AddressAlign, Hex64(0));
1387 IO.mapOptional("EntSize", Section.EntSize);
1388 IO.mapOptional("Offset", Section.Offset);
1390 IO.mapOptional("Content", Section.Content);
1391 IO.mapOptional("Size", Section.Size);
1396 assert(!IO.outputting() ||
1399 IO.mapOptional("ShAddrAlign", Section.ShAddrAlign);
1400 IO.mapOptional("ShName", Section.ShName);
1401 IO.mapOptional("ShOffset", Section.ShOffset);
1402 IO.mapOptional("ShSize", Section.ShSize);
1403 IO.mapOptional("ShFlags", Section.ShFlags);
1404 IO.mapOptional("ShType", Section.ShType);
1407 static void sectionMapping(IO &IO, ELFYAML::DynamicSection &Section) {
1408 commonSectionMapping(IO, Section);
1409 IO.mapOptional("Entries", Section.Entries);
1412 static void sectionMapping(IO &IO, ELFYAML::RawContentSection &Section) {
1413 commonSectionMapping(IO, Section);
1417 assert(!IO.outputting() || !Section.ContentBuf);
1418 IO.mapOptional("ContentArray", Section.ContentBuf);
1421 IO.setError("Content and ContentArray can't be used together");
1425 IO.mapOptional("Info", Section.Info);
1428 static void sectionMapping(IO &IO, ELFYAML::BBAddrMapSection &Section) {
1429 commonSectionMapping(IO, Section);
1430 IO.mapOptional("Content", Section.Content);
1431 IO.mapOptional("Entries", Section.Entries);
1432 IO.mapOptional("PGOAnalyses", Section.PGOAnalyses);
1435 static void sectionMapping(IO &IO, ELFYAML::StackSizesSection &Section) {
1436 commonSectionMapping(IO, Section);
1437 IO.mapOptional("Entries", Section.Entries);
1440 static void sectionMapping(IO &IO, ELFYAML::HashSection &Section) {
1441 commonSectionMapping(IO, Section);
1442 IO.mapOptional("Bucket", Section.Bucket);
1443 IO.mapOptional("Chain", Section.Chain);
1447 assert(!IO.outputting() || (!Section.NBucket && !Section.NChain));
1448 IO.mapOptional("NChain", Section.NChain);
1449 IO.mapOptional("NBucket", Section.NBucket);
1452 static void sectionMapping(IO &IO, ELFYAML::NoteSection &Section) {
1453 commonSectionMapping(IO, Section);
1454 IO.mapOptional("Notes", Section.Notes);
1458 static void sectionMapping(IO &IO, ELFYAML::GnuHashSection &Section) {
1459 commonSectionMapping(IO, Section);
1460 IO.mapOptional("Header", Section.Header);
1461 IO.mapOptional("BloomFilter", Section.BloomFilter);
1462 IO.mapOptional("HashBuckets", Section.HashBuckets);
1463 IO.mapOptional("HashValues", Section.HashValues);
1465 static void sectionMapping(IO &IO, ELFYAML::NoBitsSection &Section) {
1466 commonSectionMapping(IO, Section);
1469 static void sectionMapping(IO &IO, ELFYAML::VerdefSection &Section) {
1470 commonSectionMapping(IO, Section);
1471 IO.mapOptional("Info", Section.Info);
1472 IO.mapOptional("Entries", Section.Entries);
1475 static void sectionMapping(IO &IO, ELFYAML::SymverSection &Section) {
1476 commonSectionMapping(IO, Section);
1477 IO.mapOptional("Entries", Section.Entries);
1480 static void sectionMapping(IO &IO, ELFYAML::VerneedSection &Section) {
1481 commonSectionMapping(IO, Section);
1482 IO.mapOptional("Info", Section.Info);
1483 IO.mapOptional("Dependencies", Section.VerneedV);
1486 static void sectionMapping(IO &IO, ELFYAML::RelocationSection &Section) {
1487 commonSectionMapping(IO, Section);
1488 IO.mapOptional("Info", Section.RelocatableSec, StringRef());
1489 IO.mapOptional("Relocations", Section.Relocations);
1492 static void sectionMapping(IO &IO, ELFYAML::RelrSection &Section) {
1493 commonSectionMapping(IO, Section);
1494 IO.mapOptional("Entries", Section.Entries);
1497 static void groupSectionMapping(IO &IO, ELFYAML::GroupSection &Group) {
1498 commonSectionMapping(IO, Group);
1499 IO.mapOptional("Info", Group.Signature);
1500 IO.mapOptional("Members", Group.Members);
1503 static void sectionMapping(IO &IO, ELFYAML::SymtabShndxSection &Section) {
1504 commonSectionMapping(IO, Section);
1505 IO.mapOptional("Entries", Section.Entries);
1508 static void sectionMapping(IO &IO, ELFYAML::AddrsigSection &Section) {
1509 commonSectionMapping(IO, Section);
1510 IO.mapOptional("Symbols", Section.Symbols);
1513 static void fillMapping(IO &IO, ELFYAML::Fill &Fill) {
1514 IO.mapOptional("Name", Fill.Name, StringRef());
1515 IO.mapOptional("Pattern", Fill.Pattern);
1516 IO.mapOptional("Offset", Fill.Offset);
1517 IO.mapRequired("Size", Fill.Size);
1520 static void sectionHeaderTableMapping(IO &IO,
1522 IO.mapOptional("Offset", SHT.Offset);
1523 IO.mapOptional("Sections", SHT.Sections);
1524 IO.mapOptional("Excluded", SHT.Excluded);
1525 IO.mapOptional("NoHeaders", SHT.NoHeaders);
1528 static void sectionMapping(IO &IO, ELFYAML::LinkerOptionsSection &Section) {
1529 commonSectionMapping(IO, Section);
1530 IO.mapOptional("Options", Section.Options);
1533 static void sectionMapping(IO &IO,
1535 commonSectionMapping(IO, Section);
1536 IO.mapOptional("Libraries", Section.Libs);
1539 static void sectionMapping(IO &IO, ELFYAML::CallGraphProfileSection &Section) {
1540 commonSectionMapping(IO, Section);
1541 IO.mapOptional("Entries", Section.Entries);
1545 IO &IO, ELFYAML::SectionOrType §ionOrType) {
1546 IO.mapRequired("SectionOrType", sectionOrType.sectionNameOrType);
1549 static void sectionMapping(IO &IO, ELFYAML::ARMIndexTableSection &Section) {
1550 commonSectionMapping(IO, Section);
1551 IO.mapOptional("Entries", Section.Entries);
1554 static void sectionMapping(IO &IO, ELFYAML::MipsABIFlags &Section) {
1555 commonSectionMapping(IO, Section);
1556 IO.mapOptional("Version", Section.Version, Hex16(0));
1557 IO.mapRequired("ISA", Section.ISALevel);
1558 IO.mapOptional("ISARevision", Section.ISARevision, Hex8(0));
1559 IO.mapOptional("ISAExtension", Section.ISAExtension,
1561 IO.mapOptional("ASEs", Section.ASEs, ELFYAML::MIPS_AFL_ASE(0));
1562 IO.mapOptional("FpABI", Section.FpABI,
1564 IO.mapOptional("GPRSize", Section.GPRSize,
1566 IO.mapOptional("CPR1Size", Section.CPR1Size,
1568 IO.mapOptional("CPR2Size", Section.CPR2Size,
1570 IO.mapOptional("Flags1", Section.Flags1, ELFYAML::MIPS_AFL_FLAGS1(0));
1571 IO.mapOptional("Flags2", Section.Flags2, Hex32(0));
1574 static StringRef getStringValue(IO &IO, const char *Key) {
1576 IO.mapRequired(Key, Val);
1580 static void setStringValue(IO &IO, const char *Key, StringRef Val) {
1581 IO.mapRequired(Key, Val);
1590 IO &IO, std::unique_ptr<ELFYAML::Chunk> &Section) {
1593 if (IO.outputting()) {
1601 TypeStr = getStringValue(IO, "Type");
1603 IO.mapRequired("Type", Type);
1607 assert(!IO.outputting()); // We don't dump fills currently.
1609 fillMapping(IO, *cast<ELFYAML::Fill>(Section.get()));
1614 if (IO.outputting())
1615 setStringValue(IO, "Type", TypeStr);
1620 IO, *cast<ELFYAML::SectionHeaderTable>(Section.get()));
1624 const auto &Obj = *static_cast<ELFYAML::Object *>(IO.getContext());
1626 if (!IO.outputting())
1628 sectionMapping(IO, *cast<ELFYAML::MipsABIFlags>(Section.get()));
1633 if (!IO.outputting())
1635 sectionMapping(IO, *cast<ELFYAML::ARMIndexTableSection>(Section.get()));
1641 if (!IO.outputting())
1643 sectionMapping(IO, *cast<ELFYAML::DynamicSection>(Section.get()));
1648 if (!IO.outputting())
1650 sectionMapping(IO, *cast<ELFYAML::RelocationSection>(Section.get()));
1653 if (!IO.outputting())
1655 sectionMapping(IO, *cast<ELFYAML::RelrSection>(Section.get()));
1658 if (!IO.outputting())
1660 groupSectionMapping(IO, *cast<ELFYAML::GroupSection>(Section.get()));
1663 if (!IO.outputting())
1665 sectionMapping(IO, *cast<ELFYAML::NoBitsSection>(Section.get()));
1668 if (!IO.outputting())
1670 sectionMapping(IO, *cast<ELFYAML::HashSection>(Section.get()));
1673 if (!IO.outputting())
1675 sectionMapping(IO, *cast<ELFYAML::NoteSection>(Section.get()));
1678 if (!IO.outputting())
1680 sectionMapping(IO, *cast<ELFYAML::GnuHashSection>(Section.get()));
1683 if (!IO.outputting())
1685 sectionMapping(IO, *cast<ELFYAML::VerdefSection>(Section.get()));
1688 if (!IO.outputting())
1690 sectionMapping(IO, *cast<ELFYAML::SymverSection>(Section.get()));
1693 if (!IO.outputting())
1695 sectionMapping(IO, *cast<ELFYAML::VerneedSection>(Section.get()));
1698 if (!IO.outputting())
1700 sectionMapping(IO, *cast<ELFYAML::SymtabShndxSection>(Section.get()));
1703 if (!IO.outputting())
1705 sectionMapping(IO, *cast<ELFYAML::AddrsigSection>(Section.get()));
1708 if (!IO.outputting())
1710 sectionMapping(IO, *cast<ELFYAML::LinkerOptionsSection>(Section.get()));
1713 if (!IO.outputting())
1715 sectionMapping(IO,
1719 if (!IO.outputting())
1721 sectionMapping(IO, *cast<ELFYAML::CallGraphProfileSection>(Section.get()));
1724 if (!IO.outputting())
1726 sectionMapping(IO, *cast<ELFYAML::BBAddrMapSection>(Section.get()));
1729 if (!IO.outputting()) {
1731 IO.mapOptional("Name", Name, StringRef());
1741 sectionMapping(IO, *S);
1743 sectionMapping(IO, *cast<ELFYAML::StackSizesSection>(Section.get()));
1748 IO &io, std::unique_ptr<ELFYAML::Chunk> &C) {
1822 NormalizedMips64RelType(IO &)
1827 NormalizedMips64RelType(IO &, ELFYAML::ELF_REL Original)
1831 ELFYAML::ELF_REL denormalize(IO &) {
1845 IO &IO, ELFYAML::StackSizeEntry &E) {
1846 assert(IO.getContext() && "The IO context is not initialized");
1847 IO.mapOptional("Address", E.Address, Hex64(0));
1848 IO.mapRequired("Size", E.Size);
1852 IO &IO, ELFYAML::BBAddrMapEntry &E) {
1853 assert(IO.getContext() && "The IO context is not initialized");
1854 IO.mapRequired("Version", E.Version);
1855 IO.mapOptional("Feature", E.Feature, Hex8(0));
1856 IO.mapOptional("NumBBRanges", E.NumBBRanges);
1857 IO.mapOptional("BBRanges", E.BBRanges);
1861 IO &IO, ELFYAML::BBAddrMapEntry::BBRangeEntry &E) {
1862 IO.mapOptional("BaseAddress", E.BaseAddress, Hex64(0));
1863 IO.mapOptional("NumBlocks", E.NumBlocks);
1864 IO.mapOptional("BBEntries", E.BBEntries);
1868 IO &IO, ELFYAML::BBAddrMapEntry::BBEntry &E) {
1869 assert(IO.getContext() && "The IO context is not initialized");
1870 IO.mapOptional("ID", E.ID);
1871 IO.mapRequired("AddressOffset", E.AddressOffset);
1872 IO.mapRequired("Size", E.Size);
1873 IO.mapRequired("Metadata", E.Metadata);
1877 IO &IO, ELFYAML::PGOAnalysisMapEntry &E) {
1878 assert(IO.getContext() && "The IO context is not initialized");
1879 IO.mapOptional("FuncEntryCount", E.FuncEntryCount);
1880 IO.mapOptional("PGOBBEntries", E.PGOBBEntries);
1884 IO &IO, ELFYAML::PGOAnalysisMapEntry::PGOBBEntry &E) {
1885 assert(IO.getContext() && "The IO context is not initialized");
1886 IO.mapOptional("BBFreq", E.BBFreq);
1887 IO.mapOptional("Successors", E.Successors);
1891 mapping(IO &IO,
1893 assert(IO.getContext() && "The IO context is not initialized");
1894 IO.mapRequired("ID", E.ID);
1895 IO.mapRequired("BrProb", E.BrProb);
1898 void MappingTraits<ELFYAML::GnuHashHeader>::mapping(IO &IO,
1900 assert(IO.getContext() && "The IO context is not initialized");
1901 IO.mapOptional("NBuckets", E.NBuckets);
1902 IO.mapRequired("SymNdx", E.SymNdx);
1903 IO.mapOptional("MaskWords", E.MaskWords);
1904 IO.mapRequired("Shift2", E.Shift2);
1907 void MappingTraits<ELFYAML::DynamicEntry>::mapping(IO &IO,
1909 assert(IO.getContext() && "The IO context is not initialized");
1911 IO.mapRequired("Tag", Rel.Tag);
1912 IO.mapRequired("Value", Rel.Val);
1915 void MappingTraits<ELFYAML::NoteEntry>::mapping(IO &IO, ELFYAML::NoteEntry &N) {
1916 assert(IO.getContext() && "The IO context is not initialized");
1918 IO.mapOptional("Name", N.Name);
1919 IO.mapOptional("Desc", N.Desc);
1920 IO.mapRequired("Type", N.Type);
1923 void MappingTraits<ELFYAML::VerdefEntry>::mapping(IO &IO,
1925 assert(IO.getContext() && "The IO context is not initialized");
1927 IO.mapOptional("Version", E.Version);
1928 IO.mapOptional("Flags", E.Flags);
1929 IO.mapOptional("VersionNdx", E.VersionNdx);
1930 IO.mapOptional("Hash", E.Hash);
1931 IO.mapOptional("VDAux", E.VDAux);
1932 IO.mapRequired("Names", E.VerNames);
1935 void MappingTraits<ELFYAML::VerneedEntry>::mapping(IO &IO,
1937 assert(IO.getContext() && "The IO context is not initialized");
1939 IO.mapRequired("Version", E.Version);
1940 IO.mapRequired("File", E.File);
1941 IO.mapRequired("Entries", E.AuxV);
1944 void MappingTraits<ELFYAML::VernauxEntry>::mapping(IO &IO,
1946 assert(IO.getContext() && "The IO context is not initialized");
1948 IO.mapRequired("Name", E.Name);
1949 IO.mapRequired("Hash", E.Hash);
1950 IO.mapRequired("Flags", E.Flags);
1951 IO.mapRequired("Other", E.Other);
1954 void MappingTraits<ELFYAML::Relocation>::mapping(IO &IO,
1956 const auto *Object = static_cast<ELFYAML::Object *>(IO.getContext());
1957 assert(Object && "The IO context is not initialized");
1959 IO.mapOptional("Offset", Rel.Offset, (Hex64)0);
1960 IO.mapOptional("Symbol", Rel.Symbol);
1965 IO, Rel.Type);
1966 IO.mapRequired("Type", Key->Type);
1967 IO.mapOptional("Type2", Key->Type2, ELFYAML::ELF_REL(ELF::R_MIPS_NONE));
1968 IO.mapOptional("Type3", Key->Type3, ELFYAML::ELF_REL(ELF::R_MIPS_NONE));
1969 IO.mapOptional("SpecSym", Key->SpecSym, ELFYAML::ELF_RSS(ELF::RSS_UNDEF));
1971 IO.mapRequired("Type", Rel.Type);
1973 IO.mapOptional("Addend", Rel.Addend, (ELFYAML::YAMLIntUInt)0);
1977 IO &IO, ELFYAML::ARMIndexTableEntry &E) {
1978 assert(IO.getContext() && "The IO context is not initialized");
1979 IO.mapRequired("Offset", E.Offset);
1982 if (IO.outputting() && (uint32_t)E.Value == ARM::EHABI::EXIDX_CANTUNWIND)
1983 IO.mapRequired("Value", CantUnwind);
1984 else if (!IO.outputting() && getStringValue(IO, "Value") == CantUnwind)
1987 IO.mapRequired("Value", E.Value);
1990 void MappingTraits<ELFYAML::Object>::mapping(IO &IO, ELFYAML::Object &Object) {
1991 assert(!IO.getContext() && "The IO context is initialized already");
1992 IO.setContext(&Object);
1993 IO.mapTag("!ELF", true);
1994 IO.mapRequired("FileHeader", Object.Header);
1995 IO.mapOptional("ProgramHeaders", Object.ProgramHeaders);
1996 IO.mapOptional("Sections", Object.Chunks);
1997 IO.mapOptional("Symbols", Object.Symbols);
1998 IO.mapOptional("DynamicSymbols", Object.DynamicSymbols);
1999 IO.mapOptional("DWARF", Object.DWARF);
2006 IO.setContext(nullptr);
2009 void MappingTraits<ELFYAML::LinkerOption>::mapping(IO &IO,
2011 assert(IO.getContext() && "The IO context is not initialized");
2012 IO.mapRequired("Name", Opt.Key);
2013 IO.mapRequired("Value", Opt.Value);
2017 IO &IO, ELFYAML::CallGraphEntryWeight &E) {
2018 assert(IO.getContext() && "The IO context is not initialized");
2019 IO.mapRequired("Weight", E.Weight);