ARM: correct the relocation type for `bl` on WoA
authorSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 13 Sep 2018 04:55:08 +0000 (04:55 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 13 Sep 2018 04:55:08 +0000 (04:55 +0000)
commitaaa72c547bfd621fdbd63f631777b92bc3b1442c
treee75f8de8119f974f18cb08859d56fa7b4de634b3
parentb2724d9af8057ed60182385caa64d4c44e949b79
ARM: correct the relocation type for `bl` on WoA

The `IMAGE_REL_ARM_BRANCH20T` applies only to a `b.w` instruction.  A
thumb-2 `bl` should be relocated using a `IMAGE_REL_ARM_BRANCH24T`.
Correct the relocation that we emit in such a case.

Resolves PR38620!  Based on the patch by Jordan Rhee!

llvm-svn: 342109
llvm/lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp
llvm/test/MC/ARM/coff-relocations.s