diff options
author | Sean Fertile <sfertile@ca.ibm.com> | 2019-06-06 20:16:53 +0000 |
---|---|---|
committer | Sean Fertile <sfertile@ca.ibm.com> | 2019-06-06 20:16:53 +0000 |
commit | 6ba76dd77952af32d08fa547e8b3984c7816bbd1 (patch) | |
tree | e50976feffe2671ff46ef4114eaf858b1f9a2a5a /lld/ELF/InputSection.cpp | |
parent | 38c5ee180280816ed9e8ff36afa4520b682d0679 (diff) | |
download | bcm5719-llvm-6ba76dd77952af32d08fa547e8b3984c7816bbd1.tar.gz bcm5719-llvm-6ba76dd77952af32d08fa547e8b3984c7816bbd1.zip |
Revert "Revert "Reland D61583 [ELF] Error on relocations to STT_SECTION symbols if the sections were discarded""
This reverts commit 729111cf1824159bb4dd331cab8a829eab30313f.
Reverting the previous commit breaks other LLD buildbots.
llvm-svn: 362743
Diffstat (limited to 'lld/ELF/InputSection.cpp')
-rw-r--r-- | lld/ELF/InputSection.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index de9751722a3..832e02cb2a8 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -438,7 +438,8 @@ void InputSection::copyRelocations(uint8_t *Buf, ArrayRef<RelTy> Rels) { // hopefully creates a frame that is ignored at runtime. auto *D = dyn_cast<Defined>(&Sym); if (!D) { - error("STT_SECTION symbol should be defined"); + warn("STT_SECTION symbol should be defined"); + P->setSymbolAndType(0, 0, false); continue; } SectionBase *Section = D->Section->Repl; |