[PATCH] D35544: [COFF, ARM64] Force ADRP relocations

Tim Northover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 18 07:39:55 PDT 2017


t.p.northover added a comment.

> I'd be interested in knowing why this isn't done by default (i.e. why this doesn't need to be done at all for MachO) btw, if someone has got time to explain.

I'm pretty sure that's a bug, I get the wrong answer when I actually try out this function on iOS:

          .text
          .global _foo
          .p2align 12
  _foo:
          .fill 1023, 4, 0xd503201f
          adrp x0, Lthere
  Lthere:
          ret

I suspect it hasn't come up on MachO because CodeGen never used ADRP to address objects in the __text section so you need assembly to trigger it.

So would you mind putting that function into the base AArch64AsmBackend?


https://reviews.llvm.org/D35544





More information about the llvm-commits mailing list