[PATCH] D16892: [lld] [ELF/AArch64] Add support to some GD/LE/IS TLS relocation

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 10 11:20:19 PST 2016


ruiu added inline comments.

================
Comment at: ELF/Target.cpp:1365
@@ -1317,3 +1364,3 @@
     uint64_t X = getAArch64Page(SA) - getAArch64Page(P);
-    checkInt<33>(X, Type);
-    updateAArch64Adr(Loc, (X >> 12) & 0x1FFFFF); // X[32:12]
+    checkInt<32>(X, Type);
+    updateAArch64Addr(Loc, (X >> 12) & 0x1FFFFF); // X[32:12]
----------------
zatrazz wrote:
> ruiu wrote:
> > Why did you change this?
> Because on AArch64 ELF specification states that R_AARCH64_ADR_PREL_PG_HI21 and  R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 should check if the value is within 2^-32 and 2^32. My understanding is currently checking against 2^-33 and 2^33.
Please fix the issue in a separate patch.


http://reviews.llvm.org/D16892





More information about the llvm-commits mailing list