On Fri, 7 Mar 2025, Jeremy Drake via Mingw-w64-public wrote: > That bug was avoided, due to the fact that the code that tries to > garbage-collect unused stubs only looks at .idata sections, and delayloads > are now in .didat sections. > > However, this patch is probably overkill. This puts the whole of the > delay load stuff into .didat, while only the IAT needs to be there > (writable). I will try just moving .idata$5 into .didat$5 and see what > happens.
I tried the attached patch, and it works, but brings back the bug I referenced for 32-bit. > Also, I noticed in objdump that the Delay import directory entry in the > optional header is 0. This may have been the case before, I'm not seeing > any code to fill it in. This needs some symbols or sections for the delay import directory table. Right now, it is put into .text$2, which seems like a hack for the fact that putting it into .idata$2 would have messed up the normal import directory. I am confused by what LLD is doing though. It is putting the functions and modules into .data, and the read-only stuff into .didat. The way I read the docs suggested to use .didat to hold the function pointers so that the guard flags could allow the OS to change protection as needed without affecting other data. _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public