delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/13/14:27:29

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Injected-Via-Gmane: http://gmane.org/
To: cygwin AT cygwin DOT com
Path: not-for-mail
From: Shankar Unni <shankar AT cotagesoft DOT com>
Subject: Re: javac on cygwin
Date: Mon, 13 Jan 2003 11:26:28 -0800
Lines: 24
Message-ID: <3E2312E4.2000006@cotagesoft.com>
References: <20030104115231 DOT 62364 DOT qmail AT web10401 DOT mail DOT yahoo DOT com> <5 DOT 2 DOT 0 DOT 9 DOT 2 DOT 20030104080555 DOT 01e83058 AT pop3 DOT cris DOT com> <5 DOT 2 DOT 0 DOT 9 DOT 2 DOT 20030104161638 DOT 01fbee88 AT pop3 DOT cris DOT com> <20030105013147 DOT GC11814 AT redhat DOT com>
Mime-Version: 1.0
X-Complaints-To: usenet AT main DOT gmane DOT org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01
X-Accept-Language: en-us, en

Christopher Faylor wrote:

> I remember speculating at one point about creating wrappers to the win32
> functions like CreateFile, MoveFile, etc.  which would understand cygwin
> paths.  You could theoretically modify an .exe to load cygwin1.dll and
> use the wrapper functions.  Or you could use some of Windows hook
> facilities to do that.

Hmm. Would that even work?

I remember trying, way back when, to provide a checking malloc library 
on Windows, and then discovering that there was *no* way of intercepting 
malloc() calls *inside LIBC itself*.  In the Windows PE world (unlike 
the ELF world), a call to a routine that lives inside the same DLL is 
automatically bound to the local copy without any way to hijack the call.

Thus there's no way to play games with LD_LIBRARY_PATH (or PATH, rather) 
to load a malloc that'll hijack all calls successfully. And there's 
definitely nothing like the LD_PRELOAD mechanism to wrap existing 
pre-linked programs to inject support libraries into the lib list.

So any CreateFile calls inside the windows libraries would always go to 
the built-in CreateFile.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019