X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Fri, 24 Feb 2012 12:56:16 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: ldd fails when dll has no execute permissions Message-ID: <20120224115616.GE17797@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <1330038220 DOT 54804 DOT YahooMailNeo AT web36708 DOT mail DOT mud DOT yahoo DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1330038220.54804.YahooMailNeo@web36708.mail.mud.yahoo.com> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Feb 23 15:03, cppjavaperl wrote: > This was discovered in cygwin-1.7.10-1. > > If you run 'ldd' against an executable, and the executable has > dependent DLLs which do *not* have execute permissions, ldd's output > stops when it reaches the offending dependent DLL, and reports no > further information.  ldd does not give an error message, and the exit > code is zero. DLL's must have execute permissions to be loaded into the process. And that is what ldd does, it starts a process and inspects the process memory to see what DLLs are loaded via the Win32 debug API. The problem is that the Win32 loader stops loading as soon as it encounters the non-executable DLL. So there will simply be no further LOAD_DLL_DEBUG_EVENT. The next event is an EXIT_PROCESS_DEBUG_EVENT which means to ldd that it collected all DLLs and so it just prints the list of so far collected DLLs. I don't see how this could be changed to behave differently in this case. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple