Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <20020803003838.87028.qmail@web21010.mail.yahoo.com> Date: Fri, 2 Aug 2002 17:38:38 -0700 (PDT) From: Nicholas Wourms Subject: Re: [RFC] an alternative to rebasing To: "Steven O'Brien" , cygwin AT cygwin DOT com In-Reply-To: <20020802151403.56afae59.steven.obrien2@ntlworld.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii --- Steven O'Brien wrote: > I may have found a way of getting cygwin fork() to load dlls > reliably > without the need for rebasing dlls. > > I described my understanding of the problem in a previous post > (http://www.cygwin.com/ml/cygwin/2002-07/msg01260), but basically > it > boils down to the fact that during fork() the child process does > not > load dlls in the same order as the parent, and consequently cannot > always get them to the same address. I would be difficult to record > and > reproduce the full sequence of LoadLibrary/FreeLibrary calls, but > after > some experimentation I believe that there is an alternative. If the > child loads dlls in the order that they are in memory in the > parent, > then it appears to get the correct addresses. To test this I > patched > cygwin1.dll so that a list of loaded dlls, in address order, is > maintained, and the child walks this list instead of the existing > list > of all dlls. > > I have done some simple tests that fail with cygwin1.dll-1.3.12-2, > but > succeed with my patched dll. I am also running the gnome desktop > and > core apps which depend on run-time loaded dlls to function and that > is > OK. I would like package maintainers who would otherwise need > rebasing > (Jason?) to try my patch and report results here if they can find > time. > > If this approach proves successful, then rebasing would still > improve > load time for dlls, but apps using run-time loading of dlls would > no > longer depend on rebase to function. > > Attached is the patch and a Changelog entry Steve, If this works, I can't thank you enough. I'll report back on how it does with our problem child - Apache... Cheers, Nicholas __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- 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/