diff options
author | Igor Kudrin <ikudrin@accesssoftek.com> | 2017-11-28 08:39:40 +0000 |
---|---|---|
committer | Igor Kudrin <ikudrin@accesssoftek.com> | 2017-11-28 08:39:40 +0000 |
commit | ee8a25d756dd0da676e638dc1012c34eab0ba5b5 (patch) | |
tree | 3291380a42ea272ed34862a4664a3f4d8875646e /lld/ELF/MarkLive.cpp | |
parent | 0dcb9fd8c8bc557e1f21e0e67868679f54b66f85 (diff) |
Revert r319008, "[ELF] Do not keep symbols if they referenced only from discarded sections."
and r319051, "Add a missing test."
r319008 broke the LTO bots;
r319051 depends on changes in r319008.
Diffstat (limited to 'lld/ELF/MarkLive.cpp')
-rw-r--r-- | lld/ELF/MarkLive.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/lld/ELF/MarkLive.cpp b/lld/ELF/MarkLive.cpp index e619a955b7f..3520abeff37 100644 --- a/lld/ELF/MarkLive.cpp +++ b/lld/ELF/MarkLive.cpp @@ -64,12 +64,6 @@ static void resolveReloc(InputSectionBase &Sec, RelT &Rel, std::function<void(InputSectionBase *, uint64_t)> Fn) { Symbol &B = Sec.getFile<ELFT>()->getRelocTargetSym(Rel); - // If a symbol is referenced in a live section, it is used. - B.Used = true; - if (auto *SS = dyn_cast<SharedSymbol>(&B)) - if (!SS->isWeak()) - SS->getFile<ELFT>()->IsNeeded = true; - if (auto *D = dyn_cast<Defined>(&B)) { if (!D->Section) return; |