llvm-project/lld/MachO/Arch
Nico Weber 9721197520 [lld/mac] Set branchRange a bit more carefully
- Don't subtract thunkSize from branchRange. Most places care about
  the actual maximal branch range. Subtract thunkSize in the one place
  that wants to leave room for a thunk.
- Set it to 0x800_0000 instead of 0xFF_FFFF
- Subtract 4 for the positive branch direction since it's a
  two's complement 24bit number sign-extended mutiplied by 4,
  so its range is -0x800_0000..+0x7FF_FFFC
- Make boundary checks include the boundary values

This doesn't make a huge difference in practice. It's preparation
for a "real" fix for PR51578 -- but it also lets the repro in comment 0
in that bug place one more thunk before hitting the TODO.

Differential Revision: https://reviews.llvm.org/D108897
2021-08-30 12:36:06 -04:00
..
ARM.cpp [lld-macho] Try to unbreak build 2021-05-05 15:47:14 -04:00
ARM64.cpp [lld/mac] Set branchRange a bit more carefully 2021-08-30 12:36:06 -04:00
ARM64Common.cpp [lld-macho] Support subtractor relocations that reference sections 2021-04-20 16:58:57 -04:00
ARM64Common.h [lld-macho] Don't use arrays as template parameters 2021-04-15 21:16:34 -04:00
ARM64_32.cpp [lld-macho] Support subtractor relocations that reference sections 2021-04-20 16:58:57 -04:00
X86_64.cpp [lld-macho] Support subtractor relocations that reference sections 2021-04-20 16:58:57 -04:00