[all-commits] [llvm/llvm-project] c8c3fe: [LLD][COFF] Align import directory chunk. (#80014)
Jacek Caban via All-commits
all-commits at lists.llvm.org
Tue Jan 30 15:52:00 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c8c3fe70ae09a48408ee15a256e52a4624e0291c
https://github.com/llvm/llvm-project/commit/c8c3fe70ae09a48408ee15a256e52a4624e0291c
Author: Jacek Caban <jacek at codeweavers.com>
Date: 2024-01-31 (Wed, 31 Jan 2024)
Changed paths:
M lld/COFF/DLL.cpp
M lld/test/COFF/imports.test
M lld/test/COFF/pdb-publics-import.test
Log Message:
-----------
[LLD][COFF] Align import directory chunk. (#80014)
The loader can usually handle an unaligned import dir chunk, but It's not
optimal and it's not what MSVC link.exe does.
Windows refuses to load ARM64X binaries with unaligned import directory.
aarch64 and arm64ec imports are shared in such binaries as much as
possible. As long as they use the same set of functions from given import
directory, both the directory and import addresses chunk are just shared.
When used set of functions differs, ARM64X dynamic relocations are used
to modify import dir to point to different names and import addresses for
its EC view. I suspect that the loader expects some alignment on ARM64X
dynamic relocation offset and may not be the case when relocated import
dir is not aligned.
More information about the All-commits
mailing list