[PATCH] D14090: [ELF2] R_X86_64_COPY relocation implemented

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 12:35:50 PDT 2015


grimar added inline comments.

================
Comment at: ELF/OutputSections.cpp:203-206
@@ -197,4 +202,6 @@
     uintX_t Addend;
-    if (CanBePreempted)
+    if (NeedsCopy)
+      Addend = 0;
+    else if (CanBePreempted)
       Addend = OrigAddend;
     else if (Body)
----------------
grimar wrote:
> ruiu wrote:
> > This makes me think whether this function as a whole is correct or not. If IsRela is false, we compute an addend and then discard that value? If that information is discardable, what's the point of computing that value here?
> Probably it needs early return after 
> 
> uintX_t OrigAddend = 0; 
> 
> if IsRela false. But that is not for this patch I guess ?
*before


http://reviews.llvm.org/D14090





More information about the llvm-commits mailing list