summaryrefslogtreecommitdiffstats
path: root/llvm/tools/yaml2obj/yaml2elf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/yaml2obj/yaml2elf.cpp')
-rw-r--r--llvm/tools/yaml2obj/yaml2elf.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/yaml2obj/yaml2elf.cpp b/llvm/tools/yaml2obj/yaml2elf.cpp
index 99f55d11cff..28ffa885080 100644
--- a/llvm/tools/yaml2obj/yaml2elf.cpp
+++ b/llvm/tools/yaml2obj/yaml2elf.cpp
@@ -245,7 +245,7 @@ bool ELFState<ELFT>::initSectionHeaders(std::vector<Elf_Shdr> &SHeaders,
if (!Sec->Link.empty()) {
unsigned Index;
- if (SN2I.lookup(Sec->Link, Index)) {
+ if (SN2I.lookup(Sec->Link, Index) && !to_integer(Sec->Link, Index)) {
WithColor::error() << "Unknown section referenced: '" << Sec->Link
<< "' at YAML section '" << Sec->Name << "'.\n";
return false;
OpenPOWER on IntegriCloud