[lld] [LLD][COFF] Move delay IAT into its own .didat section. (PR #137100)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 10 11:14:32 PDT 2025
jeremyd2019 wrote:
> I guess the primary question that still stands open is how to enable `IMAGE_GUARD_PROTECT_DELAYLOAD_IAT|IMAGE_GUARD_DELAYLOAD_IAT_IN_ITS_OWN_SECTION` with MS link.exe?
> It is recommended that protected delay load be enabled by default if CFG is enabled. Images that run on older operating system versions and that use the operating system’s native delay load support, as noted, may use the delay load IAT in its own section support for backwards compatibility.
> The option to place the delay load IAT in its own section may not be required if you do not care about running an image on operating systems that predate CFG support, but tools should make that decision based on the minimum operating system support that an image needs.
To me, that means `IMAGE_GUARD_PROTECT_DELAYLOAD_IAT` *should* be enabled if using delayload when CFGuard is enabled, and `IMAGE_GUARD_DELAYLOAD_IAT_IN_ITS_OWN_SECTION` *may* be enabled if it's somehow indicated to the linker that older minimum operating system support is needed (one of the version options like subsystem version?)
https://github.com/llvm/llvm-project/pull/137100
More information about the llvm-commits
mailing list