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

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 23 08:38:30 PST 2015


davide added inline comments.

================
Comment at: ELF/Target.cpp:678
@@ -667,1 +677,3 @@
+    return true;
+  }
 }
----------------
cant' this just be a one-liner?
something like
return R_AARCH64_ADR_GOT_PAGE || R_AARCH64_LD64_GOT_LO12_NC || relocNeedsPlt();

================
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)
----------------
Please convert to the new overflow checker helper once you commit that.


http://reviews.llvm.org/D14917





More information about the llvm-commits mailing list