diff options
| author | George Rimar <grimar@accesssoftek.com> | 2018-08-15 11:43:00 +0000 |
|---|---|---|
| committer | George Rimar <grimar@accesssoftek.com> | 2018-08-15 11:43:00 +0000 |
| commit | 5290af8ad9ad8f5258305a11ca82936504fe5f42 (patch) | |
| tree | 2ee8b799fb840d5030328d9c68678ad1e8f26012 /llvm/tools | |
| parent | 4b2317ebfb816d53cce4cd19f265e1aab0e04268 (diff) | |
| download | bcm5719-llvm-5290af8ad9ad8f5258305a11ca82936504fe5f42.tar.gz bcm5719-llvm-5290af8ad9ad8f5258305a11ca82936504fe5f42.zip | |
[yaml2obj] - Teach tool to produce SHT_GROUP section with a custom type.
Currently, it is possible to use yaml2obj for producing SHT_GROUP sections
of type GRP_COMDAT. For LLD test case I need to produce an object with
a broken (different from GRP_COMDAT) type.
The patch teaches tool to do such things.
Differential revision: https://reviews.llvm.org/D50761
llvm-svn: 339764
Diffstat (limited to 'llvm/tools')
| -rw-r--r-- | llvm/tools/yaml2obj/yaml2elf.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/yaml2obj/yaml2elf.cpp b/llvm/tools/yaml2obj/yaml2elf.cpp index 18f8a271d1b..ccf1bc82865 100644 --- a/llvm/tools/yaml2obj/yaml2elf.cpp +++ b/llvm/tools/yaml2obj/yaml2elf.cpp @@ -537,7 +537,8 @@ bool ELFState<ELFT>::writeSectionContent(Elf_Shdr &SHeader, unsigned int sectionIndex = 0; if (member.sectionNameOrType == "GRP_COMDAT") sectionIndex = llvm::ELF::GRP_COMDAT; - else if (SN2I.lookup(member.sectionNameOrType, sectionIndex)) { + else if (SN2I.lookup(member.sectionNameOrType, sectionIndex) && + !to_integer(member.sectionNameOrType, sectionIndex)) { WithColor::error() << "Unknown section referenced: '" << member.sectionNameOrType << "' at YAML section' " << Section.Name << "\n"; |

