[PATCH] D15581: [ELF] - fixed not properly handled @GOTTPOFF relocation against local symbols.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 17 00:54:32 PST 2015


grimar added inline comments.

================
Comment at: ELF/InputSection.cpp:187
@@ -167,1 +186,3 @@
+    if (!PBody) {
+      uintX_t SymVA = getLocalRelTarget(*File, RI, A);
       Target->relocateOne(BufLoc, BufEnd, Type, AddrLoc, SymVA, 0,
----------------
ruiu wrote:
> This is an unrelated change to the reordering of TLS optimization code, no? If so, please split this patch into two patches.
Actually it is related. For local symbols getLocalRelTarget() is used to obtain SymVA. Previously it calculated addend inside and always used it for result. But for this relocation addend should not be taken in account as it is optimized in relocateTlsOptimize().
Thats why I had to add addend as argument here.


http://reviews.llvm.org/D15581





More information about the llvm-commits mailing list