[PATCH] D108930: [lld/mac] Leave more room for thunks in thunk placement code

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 30 12:32:57 PDT 2021


int3 accepted this revision.
int3 added a comment.
This revision is now accepted and ready to land.

lgtm. I suppose it's a bit too awkward to unit test?



================
Comment at: lld/MachO/ConcatOutputSection.cpp:242
+    // Assign addresses up-to the forward branch-range limit.
+    // Every call instruction needs a small number of bytes (on Arm64: 4),
+    // and each inserted thunk needs a slighly larger number of bytes
----------------
I'm confused about why the number of bytes for a call instruction is relevant here, since the call instruction will always be present regardless of whether the thunk is inserted


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

https://reviews.llvm.org/D108930



More information about the llvm-commits mailing list