在 2025-3-4 19:13, Pete Batard 写道:
Hi Hao,

Thanks for replying to this query.

I'm afraid that I simply don't have the scope to go through a binutils change request. I was hoping that a link script might work to inject the binary section manually. If it is simply not possible for GNU binutils to inject custom PE directory entry data at all (which I assert is what you are implying) then I guess I'll just have to continue to make do with delay-loaded DLLs (and hope that someone else also eventually takes a stab at fixing https://sourceware.org/bugzilla/show_bug.cgi?id=14339 for binutils).


We are working on load-config support in LD: 
https://github.com/jeremyd2019/binutils-gdb/pull/2.

Once this is checked in, a user can define their own `_load_config_used` to 
override the one in mingw-w64:

   ```
   __attribute__((__used__)) extern
   const IMAGE_LOAD_CONFIG_DIRECTORY _load_config_used =
     {
       .Size = sizeof(IMAGE_LOAD_CONFIG_DIRECTORY),
       // customized fields follow
     };
   ```




--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to