[PATCH] D14917: [ELF/AArch64] Add support for R_AARCH64_ADR_GOT_PAGE and R_AARCH64_LD64_GOT_LO12_NC.

Igor Kudrin via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 23 08:44:08 PST 2015


ikudrin added inline comments.

================
Comment at: ELF/Target.cpp:678
@@ -667,1 +677,3 @@
+    return true;
+  }
 }
----------------
davide wrote:
> cant' this just be a one-liner?
> something like
> return R_AARCH64_ADR_GOT_PAGE || R_AARCH64_LD64_GOT_LO12_NC || relocNeedsPlt();
We may have more GOT relocations in the near future, like R_AARCH64_*_GOTOFF_*, R_AARCH64_GOT_LD_PREL19, R_AARCH64_LD64_GOTPAGE_LO15.

================
Comment at: ELF/Target.cpp:742
@@ -728,2 +741,3 @@
     uint64_t X = getAArch64Page(SA) - getAArch64Page(P);
-    if (!isInt<33>(X))
+    if (!isInt<33>(X)) {
+      if (Type == R_AARCH64_ADR_GOT_PAGE)
----------------
davide wrote:
> Please convert to the new overflow checker helper once you commit that.
Sure.


http://reviews.llvm.org/D14917





More information about the llvm-commits mailing list