summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Writer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Writer.cpp')
-rw-r--r--lld/ELF/Writer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 426fd8b7bd6..c01a354105e 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -201,9 +201,10 @@ void Writer<ELFT>::scanRelocs(
bool NeedsPlt = false;
if (Body) {
if (auto *E = dyn_cast<SharedSymbol<ELFT>>(Body)) {
- if (E->NeedsCopy)
+ if (E->needsCopy())
continue;
- E->NeedsCopy = Target->relocNeedsCopy(Type, *Body);
+ if (Target->relocNeedsCopy(Type, *Body))
+ E->OffsetInBSS = 0;
}
NeedsPlt = Target->relocNeedsPlt(Type, *Body);
if (NeedsPlt) {
@@ -535,7 +536,7 @@ template <class ELFT> void Writer<ELFT>::createSections() {
if (auto *C = dyn_cast<DefinedCommon<ELFT>>(Body))
CommonSymbols.push_back(C);
if (auto *SC = dyn_cast<SharedSymbol<ELFT>>(Body))
- if (SC->NeedsCopy)
+ if (SC->needsCopy())
SharedCopySymbols.push_back(SC);
if (!includeInSymtab<ELFT>(*Body))
OpenPOWER on IntegriCloud