diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2017-10-13 18:32:16 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2017-10-13 18:32:16 +0000 |
commit | 10781fb879db543c9dbd52463a30d9d55c66dfd8 (patch) | |
tree | 28edaa0dab77053bb3f8c3ba218d29e8ca827864 /lld/ELF/MarkLive.cpp | |
parent | 1d5069bfc5c0758c2276a4de31d366ce982cb1a3 (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.cpp | 2 |
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); } |