X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Fri, 24 Feb 2012 12:56:16 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: ldd fails when dll has no execute permissions
Message-ID: <20120224115616.GE17797@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <1330038220.54804.YahooMailNeo@web36708.mail.mud.yahoo.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@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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

