On Fri, 7 Mar 2025, Jeremy Drake via Mingw-w64-public wrote: > On Sat, 8 Mar 2025, LIU Hao wrote: > > > Please try this patch for binutils. > > Will do. Could you also take a look at > https://sourceware.org/bugzilla/show_bug.cgi?id=14339 ? It should be > 'adjacent', and probably just a matter to make sure the right section(s) > are counted as 'referenced' so they're emitted.
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. 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. _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public