This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: ldd fails when dll has no execute permissions
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 24 Feb 2012 12:56:16 +0100
- Subject: Re: ldd fails when dll has no execute permissions
- References: <1330038220.54804.YahooMailNeo@web36708.mail.mud.yahoo.com>
- Reply-to: 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