delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/04/17/12:05:33

From: papresco AT calum DOT csclub DOT uwaterloo DOT ca (Paul Prescod)
Subject: Re: Absolute file-path under bash (cygwin32)
17 Apr 1997 12:05:33 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <33563FC2.88433BD6.cygnus.gnu-win32@calum.csclub.uwaterloo.ca>
References: <199704161831 DOT MAA17429 AT chorus DOT dr DOT lucent DOT com>
Mime-Version: 1.0
X-Mailer: Mozilla 4.0b3 [en] (Win95; I)
Original-To: marcus AT bighorn DOT dr DOT lucent DOT com
Original-CC: gnu-win32 AT cygnus DOT com
X-Priority: 3 (Normal)
Original-Sender: owner-gnu-win32 AT cygnus DOT com

marcus AT bighorn DOT dr DOT lucent DOT com 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
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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