MSYS mode (continue)

Daniel Colascione
Fri Jul 26 16:45:00 GMT 2013

On 7/26/2013 9:37 AM, Christopher Faylor wrote:
> On Fri, Jul 26, 2013 at 06:12:05PM +0200, Corinna Vinschen wrote:
>> I don't know if that's a problem for them, but this reminds me... maybe
>> we can use the LD_PRELOAD mechanism in for that?
> I was thinking that we'd use something like that (re my use of PRELOAD
> and your use of CW_HOOK) but, you're right.  Someone could potentially
> implement MSYS.dll via LD_PRELOAD:
> LD_PRELOAD=msys.dll
> and then have msys.dll hook the functions that it is interested in using
> via CW_HOOK.

By the way: can we make LD_PRELOAD hook all modules, not just the main program?
If my LD_PRELOADed module hooks write(2) in foo.exe, which uses bar.dll, then
write(2) from foo.exe will be intercepted, but write(2) from bar.dll won't be
--- only foo.exe's import table is munged.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the Cygwin-developers mailing list