From a5d5fd9ffd6699e8bd09fd1098867e91004a313f Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Tue, 19 Dec 2017 03:15:20 +0000 Subject: [PATCH] lld: Don't write preemptible symbol values to the .got. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is not necessary and matches what bfd and gold do. This was a regression from [LLVM] r315658. Obtained from: LLVM r321023 by Rafael EspĂ­ndola --- contrib/llvm/tools/lld/ELF/Relocations.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/llvm/tools/lld/ELF/Relocations.cpp b/contrib/llvm/tools/lld/ELF/Relocations.cpp index 70ca76a726d..ce8ec6f995c 100644 --- a/contrib/llvm/tools/lld/ELF/Relocations.cpp +++ b/contrib/llvm/tools/lld/ELF/Relocations.cpp @@ -812,7 +812,7 @@ static void addGotEntry(SymbolBody &Sym, bool Preemptible) { // // This is ugly -- the difference between REL and RELA should be // handled in a better way. It's a TODO. - if (!Config->IsRela) + if (!Config->IsRela && !Preemptible) InX::Got->Relocations.push_back({R_ABS, Target->GotRel, Off, 0, &Sym}); } }