MSYS mode (continue)

Daniel Colascione dancol@dancol.org
Fri Jul 26 17:03:00 GMT 2013


On 7/26/2013 10:01 AM, Christopher Faylor wrote:
> Daniel Colascione's point is a stumbling block though since the
> LD_PRELOAD method doesn't currently allow hooking anything other than
> the main executable.  That means that, say, ncurses wouldn't know about
> an MSYS-hooked uname.  It is possible to work around that but it would
> require the addition of new code to the LD_PRELOAD mechanism, requiring
> that we keep a table of hooked functions.

You don't need to maintain your own table. When you hook, you just have to munge
all the import tables of all currently-loaded modules, then munge the export
table of the module you want to hook. Munging the export table will take care of
any modules that load in the future.




-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin-developers/attachments/20130726/8122b1e6/attachment.sig>


More information about the Cygwin-developers mailing list