[ELF2] R_X86_64_COPY relocation implemented
Differential revision: http://reviews.llvm.org/D14090.
llvm-svn: 251526
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp
index 1528dc5..dd8a8c6 100644
--- a/lld/ELF/InputSection.cpp
+++ b/lld/ELF/InputSection.cpp
@@ -112,7 +112,8 @@
} else if (Target->relocPointsToGot(Type)) {
SymVA = Out<ELFT>::Got->getVA();
Type = Target->getPCRelReloc();
- } else if (isa<SharedSymbol<ELFT>>(Body)) {
+ } else if (!Target->relocNeedsCopy(Type, Body) &&
+ isa<SharedSymbol<ELFT>>(Body)) {
continue;
}
Target->relocateOne(Buf + RI.r_offset, BufEnd, Type, BaseAddr + RI.r_offset,