[PATCH] D15779: [ELF] - Implemented optimization for R_X86_64_GOTPCREL relocation.

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 20 06:37:03 PST 2016


rafael added inline comments.

================
Comment at: ELF/Target.cpp:782
@@ -738,1 +781,3 @@
     return true;
+  case R_X86_64_GOTPCREL:
+    return S && canOptimizeGotPcRel(Type, *S, D + Off);
----------------
This highlights Rui's comment that we are spreading optimizations out too much. A relocation being relative or not should really not depend on it being optimized. If it is optimized, some other relocation takes its place.

Can you just check for optimization at the caller and pass the new relocation value?


http://reviews.llvm.org/D15779





More information about the llvm-commits mailing list