Unverified Commit c8c3fe70 authored by Jacek Caban's avatar Jacek Caban Committed by GitHub
Browse files

[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.
parent 86cd2fbd
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment