Index: llvm/trunk/include/llvm/ObjectYAML/ELFYAML.h =================================================================== --- llvm/trunk/include/llvm/ObjectYAML/ELFYAML.h +++ llvm/trunk/include/llvm/ObjectYAML/ELFYAML.h @@ -129,7 +129,6 @@ ELF_SHF Flags; llvm::yaml::Hex64 Address; StringRef Link; - StringRef Info; llvm::yaml::Hex64 AddressAlign; Optional EntSize; @@ -172,6 +171,7 @@ // Members of a group contain a flag and a list of section indices // that are part of the group. std::vector Members; + StringRef Signature; /* Info */ Group() : Section(SectionKind::Group) {} @@ -189,6 +189,7 @@ struct RelocationSection : Section { std::vector Relocations; + StringRef RelocatableSec; /* Info */ RelocationSection() : Section(SectionKind::Relocation) {} Index: llvm/trunk/lib/ObjectYAML/ELFYAML.cpp =================================================================== --- llvm/trunk/lib/ObjectYAML/ELFYAML.cpp +++ llvm/trunk/lib/ObjectYAML/ELFYAML.cpp @@ -854,7 +854,6 @@ IO.mapOptional("Link", Section.Link, StringRef()); IO.mapOptional("AddressAlign", Section.AddressAlign, Hex64(0)); IO.mapOptional("EntSize", Section.EntSize); - IO.mapOptional("Info", Section.Info, StringRef()); } static void sectionMapping(IO &IO, ELFYAML::DynamicSection &Section) { @@ -875,12 +874,14 @@ static void sectionMapping(IO &IO, ELFYAML::RelocationSection &Section) { commonSectionMapping(IO, Section); + IO.mapOptional("Info", Section.RelocatableSec, StringRef()); IO.mapOptional("Relocations", Section.Relocations); } -static void groupSectionMapping(IO &IO, ELFYAML::Group &group) { - commonSectionMapping(IO, group); - IO.mapRequired("Members", group.Members); +static void groupSectionMapping(IO &IO, ELFYAML::Group &Group) { + commonSectionMapping(IO, Group); + IO.mapOptional("Info", Group.Signature, StringRef()); + IO.mapRequired("Members", Group.Members); } void MappingTraits::mapping( Index: llvm/trunk/test/tools/llvm-readobj/demangle.test =================================================================== --- llvm/trunk/test/tools/llvm-readobj/demangle.test +++ llvm/trunk/test/tools/llvm-readobj/demangle.test @@ -133,7 +133,6 @@ Type: SHT_DYNSYM Flags: [ SHF_ALLOC ] Link: .dynstr - Info: 1 Address: 0x100 AddressAlign: 0x100 EntSize: 0x18 Index: llvm/trunk/test/tools/llvm-readobj/gnu-hash-symbols.test =================================================================== --- llvm/trunk/test/tools/llvm-readobj/gnu-hash-symbols.test +++ llvm/trunk/test/tools/llvm-readobj/gnu-hash-symbols.test @@ -63,7 +63,6 @@ Type: SHT_DYNSYM Flags: [ SHF_ALLOC ] Link: .dynstr - Info: 1 Address: 0x100 AddressAlign: 0x100 EntSize: 0x18 Index: llvm/trunk/tools/obj2yaml/elf2yaml.cpp =================================================================== --- llvm/trunk/tools/obj2yaml/elf2yaml.cpp +++ llvm/trunk/tools/obj2yaml/elf2yaml.cpp @@ -354,7 +354,7 @@ auto NameOrErr = getUniquedSectionName(*InfoSection); if (!NameOrErr) return errorToErrorCode(NameOrErr.takeError()); - S.Info = NameOrErr.get(); + S.RelocatableSec = NameOrErr.get(); return obj2yaml_error::success; } @@ -468,7 +468,7 @@ Expected symbolName = getSymbolName(symbol, StrTab, Symtab); if (!symbolName) return errorToErrorCode(symbolName.takeError()); - S->Info = *symbolName; + S->Signature = *symbolName; const Elf_Word *groupMembers = reinterpret_cast(sectionContents->data()); const long count = (Shdr->sh_size) / sizeof(Elf_Word); Index: llvm/trunk/tools/yaml2obj/yaml2elf.cpp =================================================================== --- llvm/trunk/tools/yaml2obj/yaml2elf.cpp +++ llvm/trunk/tools/yaml2obj/yaml2elf.cpp @@ -270,15 +270,16 @@ SHeader.sh_link = getDotSymTabSecNo(); unsigned Index; - if (!convertSectionIndex(SN2I, S->Name, S->Info, Index)) + if (!convertSectionIndex(SN2I, S->Name, S->RelocatableSec, Index)) return false; SHeader.sh_info = Index; if (!writeSectionContent(SHeader, *S, CBA)) return false; } else if (auto S = dyn_cast(Sec.get())) { unsigned SymIdx; - if (SymN2I.lookup(S->Info, SymIdx) && !to_integer(S->Info, SymIdx)) { - WithColor::error() << "Unknown symbol referenced: '" << S->Info + if (SymN2I.lookup(S->Signature, SymIdx) && + !to_integer(S->Signature, SymIdx)) { + WithColor::error() << "Unknown symbol referenced: '" << S->Signature << "' at YAML section '" << S->Name << "'.\n"; return false; }