[lld] [lld][MachO] Support for -interposable (PR #131813)
John Holdsworth via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 26 15:30:37 PDT 2025
johnno1962 wrote:
Hi @smeenai, I can confirm your first question by observation of the linker in use in a large-ish project that requires interposing for dynamic updates. By chance Apple's Xcode allows you to choose an executable or dynamic library for your "main" image containing all code and both cases definitely work with "my" ldd and Apple's linker so indirecting symbols in an executable is more faithful. This is the reason the code I'm proposing is different from your original suggestion last week.
Your second question about `_main` I can't confirm as I can't use `llvm-objdump` to see the symbols being indirected using Apple's linker in fact it doesn't see any indirections for all my test executables even using ldd even though they are definitely interposing according to how the application changes behaviour after using [fishhook](https://github.com/facebook/fishhook). Can you think of an explanation for this?
https://github.com/llvm/llvm-project/pull/131813
More information about the llvm-commits
mailing list