Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: RE: [BUG] cygwin-1.3.3-2 -- making auto-import dlls X-MimeOLE: Produced By Microsoft Exchange V6.0.4417.0 Date: Wed, 19 Sep 2001 12:34:51 +1000 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [BUG] cygwin-1.3.3-2 -- making auto-import dlls Thread-Index: AcFAstptFTV0c4VbTQGwtkCoMsQ87wAAAL1A From: "Robert Collins" To: "Charles Wilson" , Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id WAA08359 I went round this one with Paul's original patch. Auto image base is bad (for cygwin). Very bad. Ok, now the scare is over, here is why: Lemma: Cygwin1.dll is only relocatable if it is consistently relocated to the same address in _all_ process's that load cygwin1.dll. Proof: cygwin copies the process address space to fork, if references to cygwin1.dll are not valid in the hild, the child will die badly. Auto image base will conflict with cygwin1.dll semi-randomly. Because other cygwin linked .dll's come before cygwin1.dll in the PE header (don't know if this is due to link order, sorting of the file or whathaveyou) cygwin1.dll is the last .dll. Thus when there is a conflict, cygwin1.dll gets relocated. The problem: bash does not depend on these conflicting .dll's, so every process started that does depend on them will fail to initialise. Solution: don't use auto-image-base. The overhead from relocation is quite low, why not let windows just do its thing. Rob > -----Original Message----- > From: Charles Wilson [mailto:cwilson AT ece DOT gatech DOT edu] > Sent: Wednesday, September 19, 2001 12:19 PM > To: cygwin AT cygwin DOT com > Subject: Re: [BUG] cygwin-1.3.3-2 -- making auto-import dlls > > > Christopher Faylor wrote: > > > On Wed, Sep 19, 2001 at 10:38:24AM +0900, Jong B. Lee wrote: > > > >>Attached file is a part of Charles Wilson's dllhelpers-0.2.7 > >>(originally from Mumit Khan's). This dllhelpers used to be > introduced > >>as an example for those people who ask how to build and use dlls on > >>cygwin, and its' good. > >> > >>It fails to run on cygwin 1.3.3-2 with a heap error. C++/F77 cases > >>work good. Only C examples fail to execute. This error > does not occur > >>on cygwin-1.3.2-1. > >> > > > > Change the DLL load address to be something besides > 61500000 and it will work. > > > > > Does this mean that something needs to be fixed in the > "--auto-image-base" code? Since the dllhelpers example uses > that flag, > *I* would expect ld to NOT generate a known bad load address. > > > --Chuck > > > > -- > 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/ > > -- 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/