In https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#the-load-configuration-structure-image-only, the IMAGE_GUARD_DELAYLOAD_IAT_IN_ITS_OWN_SECTION flag is described as "Delayload import table in its own .didat section (with nothing else in it) that can be freely reprotected."
I am preparing a patch to binutils to put the delay IAT in its own (read/write) .didat output section. I would then like to prepare a pull request to LLD to do the same. However, I see that LLD is currently using .didat input section for the delay load directory table instead. Is this something that's done for compatibility with MS link.exe and cannot be changed, or would it be acceptable to move that into .rdata to put only the delay IAT in .didat ?
@mstorsjo @lhmouse