[lld-macho] Preliminary support for ARM_RELOC_BR24
authorJez Ng <jezng@fb.com>
Wed, 5 May 2021 18:40:41 +0000 (14:40 -0400)
committerJez Ng <jezng@fb.com>
Wed, 5 May 2021 18:41:01 +0000 (14:41 -0400)
commit8806df4778349dac4e8744b9ae50f43b80eedda3
tree7683588d1fdca47c57453a3d9b1532392912c943
parent20f51ffe67d12ab72c917dc4b371b55c80321393
[lld-macho] Preliminary support for ARM_RELOC_BR24

ARM_RELOC_BR24 is used for BL/BLX instructions from within ARM (i.e. not
Thumb) code. This diff just handles the basic case: branches from ARM to
ARM, or from ARM to Thumb where no shimming is required. (See comments
in ARM.cpp for why shims are required.)

Note: I will likely be deprioritizing ARM work for the near future to
focus on other parts of LLD. Apologies for the half-done state of this;
I'm just trying to wrap up what I've already worked on.

Reviewed By: #lld-macho, alexshap

Differential Revision: https://reviews.llvm.org/D101814
lld/MachO/Arch/ARM.cpp
lld/test/MachO/arm-branch-relocs.s [new file with mode: 0644]