[PATCH] D108897: [lld/mac] Set branchRange a bit more carefully

Thorsten via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 29 13:35:22 PDT 2021


tschuett added inline comments.


================
Comment at: lld/MachO/ConcatOutputSection.cpp:258
       uint64_t lowVA = branchRange < callVA ? callVA - branchRange : 0;
-      uint64_t highVA = callVA + branchRange;
+      uint64_t highVA = callVA + branchRange - 4;
       // Calculate our call referent address
----------------
thakis wrote:
> (See also `AArch64::inBranchRange` in lld/ELF/Arch/AArch64.cpp)
Do you have something with more information than a 4. Maybe sizeof() or a named  constant?


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

https://reviews.llvm.org/D108897



More information about the llvm-commits mailing list