[PATCH] D34857: [COFF, ARM64] Add initial relocation types

Mandeep Singh Grang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 16 10:19:16 PDT 2017


mgrang added a comment.

In https://reviews.llvm.org/D34857#810769, @mstorsjo wrote:

> In https://reviews.llvm.org/D34857#810706, @mgrang wrote:
>
> > I see that IMAGE_REL_ARM64_SECTION is generated only on Windows with dumpbin (and not on Linux with llvm-objdump). Does it make sense to limit this unit test only for Windows?
>
>
> I'd rather have a look at llvm-objdump and see if it can easily be fixed to show what you want.
>
> In https://reviews.llvm.org/D34857#810748, @mgrang wrote:
>
> > Unit tests for IMAGE_REL_ARM64_PAGEOFFSET_12A and IMAGE_REL_ARM64_PAGEOFFSET_12L not added as llvm-mc currently cannot parse the assembly for these.  Here is my code for the above two relocations:
> >
> >   adrp x0, foo
> >   add x0, x0, foo
> >
>
>
> The correct syntax that llvm-mc should accept is this:
>
>   add x0, x0, :lo12:foo
>
>
> IIRC this should also work with ldr/str:
>
>   ldr x0, [x0, :lo12:foo]
>


Thanks @mstorsjo for pointing me to the correct assembly for add/ldr. My test cases now work for all the implemented relocation types.


Repository:
  rL LLVM

https://reviews.llvm.org/D34857





More information about the llvm-commits mailing list