diff options
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
| -rw-r--r-- | lld/ELF/OutputSections.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index cfd6133cfee..0a6c33c1d02 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -707,7 +707,7 @@ lld::elf2::getLocalRelTarget(const ObjectFile<ELFT> &File, // and must be treated specially. For now we just replace the symbol with // 0. InputSectionBase<ELFT> *Section = File.getSection(*Sym); - if (Section == &InputSection<ELFT>::Discarded) + if (Section == &InputSection<ELFT>::Discarded || !Section->isLive()) return Addend; uintX_t VA = Section->OutSec->getVA(); |

