summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/ELFObjectWriter.cpp
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2018-12-04 10:55:03 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2018-12-04 10:55:03 +0000
commitc968d83399869dd2a769fc559b8ee0c0a72b63aa (patch)
treef1621b73195750722604a7ab8cb28c59791579a1 /llvm/lib/MC/ELFObjectWriter.cpp
parent88e0660bf259d2f01714b6ef04be7ea008f1473c (diff)
downloadbcm5719-llvm-c968d83399869dd2a769fc559b8ee0c0a72b63aa.tar.gz
bcm5719-llvm-c968d83399869dd2a769fc559b8ee0c0a72b63aa.zip
Revert r348243 "[llvm-mc] - Do not crash when referencing undefined debug sections."
It broke msan and asan bots it seems: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/26794/steps/check-llvm%20msan/logs/stdio http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/20993/steps/ninja%20check%201/logs/stdio llvm-svn: 348248
Diffstat (limited to 'llvm/lib/MC/ELFObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/ELFObjectWriter.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp
index 89f3b30cddd..5b8b013ad08 100644
--- a/llvm/lib/MC/ELFObjectWriter.cpp
+++ b/llvm/lib/MC/ELFObjectWriter.cpp
@@ -669,20 +669,6 @@ void ELFWriter::computeSymbolTable(
} else {
const MCSectionELF &Section =
static_cast<const MCSectionELF &>(Symbol.getSection());
-
- // We may end up with a situation when section symbol is technically
- // defined, but should not be. That happens because we explicitly
- // pre-create few .debug_* sections to have accessors.
- // And if these sections were not really defined in the code, but were
- // referenced, we simply error out.
- if (!Section.isRegistered()) {
- assert(static_cast<const MCSymbolELF &>(Symbol).getType() ==
- ELF::STT_SECTION);
- Ctx.reportError(SMLoc(),
- "Undefined section reference: " + Symbol.getName());
- continue;
- }
-
if (Mode == NonDwoOnly && isDwoSection(Section))
continue;
MSD.SectionIndex = SectionIndexMap.lookup(&Section);
OpenPOWER on IntegriCloud