[lld] [LLD][COFF] Implement support for hybrid IAT on ARM64X (PR #124189)
Jacek Caban via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 23 12:55:52 PST 2025
cjacek wrote:
As far as I can tell, this approach is compatible with how MSVC arranges hybrid IAT. However, I've noticed two differences:
- MSVC also merges import thunks, combining the `func` symbol in the native view with the `#func` symbol in the EC view, adding ARM64X relocations to the code itself. Implementing this wouldn't be difficult, but its benefit seems questionable. It trades a 12-byte function for at least 10 bytes of relocations (likely more with the page header and alignment), so it doesn't save storage. It may reduce virtual memory usage, as relocations are not mapped.
- MSVC appears to ignore ordinals when comparing imports. While this is fine for named imports, where the ordinal is just a hint, it's not right for `NONAME` imports. I chose not to follow MSVC in this regard and instead ensure that they match before merging hybrid entries.
https://github.com/llvm/llvm-project/pull/124189
More information about the llvm-commits
mailing list