[PATCH] D14606: [ELF2/AArch64] Add support for R_AARCH64_CALL26 and R_AARCH64_JUMP26.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 09:55:55 PST 2015


ruiu added inline comments.

================
Comment at: ELF/Target.cpp:669-672
@@ +668,6 @@
+    if (!isInt<28>(X))
+      error(Twine("Relocation ") +
+            ((Type == R_AARCH64_CALL26) ? "R_AARCH64_CALL26"
+                                        : "R_AARCH64_JUMP26") +
+            " out of range");
+    write32le(Loc, read32le(Loc) | ((X & 0x0FFFFFFC) >> 2));
----------------
I'd do this

  if (!isInt<28>(X)) {
    if (Type == R_AARCH64_JUMP26)
      error("Relocation R_AARCH64_JUMP26 out of range");
    error("Relocation R_AARCH64_CALL26 out of range");
  }


http://reviews.llvm.org/D14606





More information about the llvm-commits mailing list