[lld] 944f109 - [ELF][PPC64] Don't copy ppc64BranchltIndex in replaceWithDefined
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 5 09:34:07 PST 2019
Author: Fangrui Song
Date: 2019-12-05T09:33:30-08:00
New Revision: 944f109ad778d53827b2473c8465985733c931b4
URL: https://github.com/llvm/llvm-project/commit/944f109ad778d53827b2473c8465985733c931b4
DIFF: https://github.com/llvm/llvm-project/commit/944f109ad778d53827b2473c8465985733c931b4.diff
LOG: [ELF][PPC64] Don't copy ppc64BranchltIndex in replaceWithDefined
replaceWithDefined is used by canonical PLT and copy relocations, which
imply that the symbol is preemptable. ppc64BranchltIndex is only used by
non-preemptable cases, and it can only be the default value in
replaceWithDefined.
Added:
Modified:
lld/ELF/Relocations.cpp
Removed:
################################################################################
diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp
index ea30662d3824..2c020be063ee 100644
--- a/lld/ELF/Relocations.cpp
+++ b/lld/ELF/Relocations.cpp
@@ -509,7 +509,6 @@ static void replaceWithDefined(Symbol &sym, SectionBase *sec, uint64_t value,
sym.pltIndex = old.pltIndex;
sym.gotIndex = old.gotIndex;
sym.verdefIndex = old.verdefIndex;
- sym.ppc64BranchltIndex = old.ppc64BranchltIndex;
sym.exportDynamic = true;
sym.isUsedInRegularObj = true;
}
More information about the llvm-commits
mailing list