[PATCH] D100818: [lld-macho] Implement branch-range-extension thunks

Greg McGary via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 11 21:28:17 PDT 2021


gkm marked 2 inline comments as done.
gkm added inline comments.


================
Comment at: lld/test/MachO/tools/generate-thunkable-program.py:15-17
+# This list comes from libSystem.tbd and contains a sizeable subset
+# of dylib calls available for all MacOS target archs.
+libSystem_calls = (
----------------
int3 wrote:
> int3 wrote:
> > Couldn't we just generate a bunch of random strings for the symbols? This list isn't really helping us exercise new code paths in LLD...
> not yet addressed
I am leveraging symbols already present in `libSystem.tbd`. The goal is to generate calls through dylib stubs, to make sure the thunker properly makes thunks for out-of-range stubs. That is the LLD code path I am exercising. I could generate random strings, and then generate a matching `libLOL.tbd`, but that seems like extra work for marginal benefit. I suppose an advantage to generating `libLOL.tbd` is that I can control it size and stress-test the thunker with a huge dylib, or with multiple generated dylibs containing random symbols.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100818



More information about the llvm-commits mailing list