summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Symbols.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Symbols.cpp')
-rw-r--r--lld/ELF/Symbols.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp
index 5300aafaff8..9a4de4faf10 100644
--- a/lld/ELF/Symbols.cpp
+++ b/lld/ELF/Symbols.cpp
@@ -48,17 +48,11 @@ static uint64_t getSymVA(const Symbol &Sym, int64_t &Addend) {
auto &D = cast<Defined>(Sym);
SectionBase *IS = D.Section;
- // According to the ELF spec reference to a local symbol from outside
- // the group are not allowed. Unfortunately .eh_frame breaks that rule
- // and must be treated specially. For now we just replace the symbol with
- // 0.
- if (IS == &InputSection::Discarded)
- return 0;
-
// This is an absolute symbol.
if (!IS)
return D.Value;
+ assert(IS != &InputSection::Discarded);
IS = IS->Repl;
uint64_t Offset = D.Value;
OpenPOWER on IntegriCloud