Subject: Re: Absolute file-path under bash (cygwin32)
From: [email-masked] (Paul Prescod)

17 Apr 1997 12:05:33 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.0b3 [en] (Win95; I)
Original-To: [email-masked]
Original-CC: [email-masked]
X-Priority: 3 (Normal)
Original-Sender: [email-masked]

[email-masked] wrote:
> Well, they are marked, but you have to look a little deeply.  If the binary
> imports cygwin.dll, then it's a cygwin binary.  To find this, you have to
> find the .idata section and look through a list of 5 word headers.  The
> 4th word of the header points to the name of the DLL to be imported.

Yeah, but if it can be done in ld then the lookup becomes very quick.
This is the strategy that Windows and OS/2 use for differentating the
different kinds of executables.
 
> This may not be too bad to do, particularly if this becomes a "tracked alias"
> and is tagged as cygwin/!cygwin automatically.  The information for the
> dozen or so programs frequently run would be cached pretty quickly.  

It all seems a little messy and slow. Why do something at runtime if it
can be done once at link time with no runtime performance hit?

> Of
> course, the cygwin executable should not expect anything from bash, because
> it should run on its own from any command interpreter, but this would
> interface to non-cygwin programs much nicer.

I agree! As long as pathnames are clearly differentitaed (e.g.
$/foo/bar) and executables are clearly differentiated then bash can do
the right thing with no guessing.

 Paul Prescod

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".