summaryrefslogtreecommitdiff
path: root/lld/ELF/MarkLive.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2017-10-13 18:32:16 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2017-10-13 18:32:16 +0000
commit10781fb879db543c9dbd52463a30d9d55c66dfd8 (patch)
tree28edaa0dab77053bb3f8c3ba218d29e8ca827864 /lld/ELF/MarkLive.cpp
parent1d5069bfc5c0758c2276a4de31d366ce982cb1a3 (diff)
Handle shared symbols in --gc-sections.
We don't want to gc a section if it is used via __start_*, but we were doing that if the same symbol was visible in a shared library.
Diffstat (limited to 'lld/ELF/MarkLive.cpp')
-rw-r--r--lld/ELF/MarkLive.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/ELF/MarkLive.cpp b/lld/ELF/MarkLive.cpp
index b91be129772..62a0039ef01 100644
--- a/lld/ELF/MarkLive.cpp
+++ b/lld/ELF/MarkLive.cpp
@@ -74,7 +74,7 @@ static void resolveReloc(InputSectionBase &Sec, RelT &Rel,
return;
}
- if (B.isUndefined())
+ if (!B.isInCurrentDSO())
for (InputSectionBase *Sec : CNamedSections.lookup(B.getName()))
Fn(Sec, 0);
}