[lld] r258069 - Clarify the comment and code a bit. NFC.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 18 12:07:00 PST 2016


Author: rafael
Date: Mon Jan 18 14:06:59 2016
New Revision: 258069

URL: http://llvm.org/viewvc/llvm-project?rev=258069&view=rev
Log:
Clarify the comment and code a bit. NFC.

Modified:
    lld/trunk/ELF/Writer.cpp

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=258069&r1=258068&r2=258069&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Mon Jan 18 14:06:59 2016
@@ -312,10 +312,11 @@ void Writer<ELFT>::scanRelocs(
 
     // Here we are creating a relocation for the dynamic linker based on
     // a relocation from an object file, but some relocations need no
-    // load-time fixup. Skip such relocation.
+    // load-time fixup when the final target is known. Skip such relocation.
     bool CBP = canBePreempted(Body, NeedsGot);
-    bool NoDynrel = Target->isRelRelative(Type) || Target->isSizeReloc(Type);
-    if (!CBP && (NoDynrel || !Config->Shared))
+    bool NoDynrel = Target->isRelRelative(Type) || Target->isSizeReloc(Type) ||
+                    !Config->Shared;
+    if (!CBP && NoDynrel)
       continue;
 
     if (CBP)




More information about the llvm-commits mailing list