[PATCH] D57277: [COFF, ARM64] Don't put jump table into a separate COFF section for EK_LabelDifference32

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 26 12:40:04 PST 2019


mstorsjo added a comment.

In D57277#1372291 <https://reviews.llvm.org/D57277#1372291>, @pcc wrote:

> > There is no relocation type for linker to do fixup for this entry correctly if they are in different COFF section.
>
> Looks like there is now. From the PE spec:
>
> > IMAGE_REL_ARM64_REL32 
> > 0x0011
> >  The 32-bit relative address from the byte following the relocation.
>
> According to archive.org, this was added in the 11/04/2018 revision of the spec. Assuming that support for this was added to the linker recently, we'd probably need to make emitting this conditional on a new enough toolset, though.


Empirically testing, MSVC 2017 15.4 errors out on this relocation, while 15.5 succeeds (and seems to handle it similarly to the MSVC 2019 previews). 15.4 was the first public version that included the compiler for ARM64 at all, while it only became really officially supported around 15.8 or so. I'll add support for the new relocation in LLD (and using a newer Clang with an older LLD probably isn't something to worry about here IMO).

So given this, it should be fine to use it, but this patch also is totally fine with me.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57277/new/

https://reviews.llvm.org/D57277





More information about the llvm-commits mailing list