From 944f109ad778d53827b2473c8465985733c931b4 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 2 Dec 2019 15:31:11 -0800 Subject: [PATCH] [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. --- lld/ELF/Relocations.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp index ea30662..2c020be 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; } -- 2.7.4