[llvm] [aarch64][win] Add support for import call optimization (equivalent to MSVC /d2ImportCallOptimization) (PR #121516)
Daniel Paoliello via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 3 14:46:08 PST 2025
dpaoliello wrote:
> For cases when dll imported functions are called without being marked as dllimport in headers, we jump via a thunk (from the import library, and/or linker generated). Can the same thing be applied to them? Does that require including similar .impcall sections in the import libraries for the thunks? (In the case of lld, it actually doesn't use the import library contents here but just synthesize it on its own - there we could do the same right away without needing to update import libraries with this metadata.)
I'm not 100% sure how MSVC handles this - there are no changes to import libraries (i.e., there's no `.impcall` section), so I'm guessing it would be done within the linker.
If lld supports generating the Dynamic Value Relocation Table, there's no reason it can't add additional entries in there for other indirect branches to imported functions that it knows about.
https://github.com/llvm/llvm-project/pull/121516
More information about the llvm-commits
mailing list