summaryrefslogtreecommitdiffstats
path: root/lld/ELF/SyntheticSections.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2017-05-15 17:53:26 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2017-05-15 17:53:26 +0000
commitc5bee3212b099b345e5f49ebab53d43874cd826e (patch)
tree81d83a99ceabac3f338b0ea058de8c72f86d74a7 /lld/ELF/SyntheticSections.cpp
parente8a49b38508fac85b065bb8e174d46bb566036ef (diff)
downloadbcm5719-llvm-c5bee3212b099b345e5f49ebab53d43874cd826e.tar.gz
bcm5719-llvm-c5bee3212b099b345e5f49ebab53d43874cd826e.zip
ELF: --gdb-index: Do not add dead sections to the address area.
Fixes PR33032. Differential Revision: https://reviews.llvm.org/D33175 llvm-svn: 303088
Diffstat (limited to 'lld/ELF/SyntheticSections.cpp')
-rw-r--r--lld/ELF/SyntheticSections.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp
index 3eebc4e7862..a42d1587cee 100644
--- a/lld/ELF/SyntheticSections.cpp
+++ b/lld/ELF/SyntheticSections.cpp
@@ -1704,7 +1704,7 @@ readCuList(DWARFContext &Dwarf, InputSection *Sec) {
static InputSectionBase *findSection(ArrayRef<InputSectionBase *> Arr,
uint64_t Offset) {
for (InputSectionBase *S : Arr)
- if (S && S != &InputSection::Discarded)
+ if (S && S != &InputSection::Discarded && S->Live)
if (Offset >= S->getOffsetInFile() &&
Offset < S->getOffsetInFile() + S->getSize())
return S;
OpenPOWER on IntegriCloud