summaryrefslogtreecommitdiffstats
path: root/lld/ELF/InputSection.cpp
diff options
context:
space:
mode:
authorHaojian Wu <hokein@google.com>2019-05-28 11:21:59 +0000
committerHaojian Wu <hokein@google.com>2019-05-28 11:21:59 +0000
commit241dcb386e7dfd4f775f79dab5386d0803911dda (patch)
tree26dc83d3184b13adc9d7964f526e68c7307f7f6a /lld/ELF/InputSection.cpp
parent48c8bdad2afb627a3a3ef7e6f450b97b6a4a6b9c (diff)
downloadbcm5719-llvm-241dcb386e7dfd4f775f79dab5386d0803911dda.tar.gz
bcm5719-llvm-241dcb386e7dfd4f775f79dab5386d0803911dda.zip
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
Diffstat (limited to 'lld/ELF/InputSection.cpp')
-rw-r--r--lld/ELF/InputSection.cpp3
1 files changed, 1 insertions, 2 deletions
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<RelTy> Rels) {
// hopefully creates a frame that is ignored at runtime.
auto *D = dyn_cast<Defined>(&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;
OpenPOWER on IntegriCloud