From 241dcb386e7dfd4f775f79dab5386d0803911dda Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 28 May 2019 11:21:59 +0000 Subject: Revert [ELF] Error on relocations to STT_SECTION symbols if the sections were discarded This reverts r361792 (git commit cfca5095df0209c60109696d6cc368d49e2c5939), the revision causes link errors internally, will share more details with the author. llvm-svn: 361806 --- lld/ELF/InputSection.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lld/ELF/InputSection.cpp') diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index 74878931afb..07a30ed57c4 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -438,8 +438,7 @@ void InputSection::copyRelocations(uint8_t *Buf, ArrayRef Rels) { // hopefully creates a frame that is ignored at runtime. auto *D = dyn_cast(&Sym); if (!D) { - warn("STT_SECTION symbol should be defined"); - P->setSymbolAndType(0, 0, false); + error("STT_SECTION symbol should be defined"); continue; } SectionBase *Section = D->Section->Repl; -- cgit v1.2.3