summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorJacek Caban <jacek@codeweavers.com>2024-09-08 15:36:24 +0200
committerGitHub <noreply@github.com>2024-09-08 15:36:24 +0200
commitdec0781c8b06b1a5b8ad8646d299f643745a36d0 (patch)
tree08a56af9971715d555c09b874eb37e1f99b81dd9 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent4ea6552f4bf049ece2bb9fa2620a67123afb725c (diff)
[LLD][COFF] Always locate the IAT at the beginning of the .rdata section and align its size to 4KB on ARM64EC. (#107588)
This mimics the behavior of MSVC's link.exe. My guess is that the reason for this approach is to facilitate tracking runtime IAT modifications. An auxiliary IAT allows bypassing the call checker for imported function calls. It's the OS's responsibility to ensure that, if runtime patching occurs, the auxiliary IAT is reverted to enable call checking. Modifying the IAT is a form of runtime patching, and ensuring that it doesn’t share pages with other data likely helps with tracking accuracy. Although alignment alone should ensure that the IAT occupies its own pages, placing it at the beginning of the .rdata section might be an optimization. This way, padding is only needed after the IAT, not before. The auxiliary IAT seems to follow a similar idea but is positioned at the end of the .rdata section.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions