delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/02/24/15:43:01

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE
X-Spam-Check-By: sourceware.org
X-Mail-Handler: MailHop Outbound by DynDNS
X-Report-Abuse-To: abuse AT dyndns DOT com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information)
X-MHO-User: U2FsdGVkX1+jXPdFaPOzNXzu++VV0OJW
Date: Fri, 24 Feb 2012 15:42:33 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: ldd fails when dll has no execute permissions
Message-ID: <20120224204233.GC19740@ednor.casa.cgf.cx>
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
In-Reply-To: <1330038220.54804.YahooMailNeo@web36708.mail.mud.yahoo.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 Thu, Feb 23, 2012 at 03:03:40PM -0800, 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.
>
>To test, pick an application with a dependent DLL, then chmod 666 on
>that DLL (pick a DLL you can live without temporarily, of course), then
>run 'ldd' against the executable.

Can't reproduce this (with the latest DLL from the snapshot):

bash$ chmod a-w /bin/*.dll
bash$ ldd /bin/pwd
        ntdll.dll => /cygdrive/c/Windows/SysWOW64/ntdll.dll (0x779a0000)
        kernel32.dll => /cygdrive/c/Windows/syswow64/kernel32.dll (0x75310000)
        KERNELBASE.dll => /cygdrive/c/Windows/syswow64/KERNELBASE.dll (0x75ae0000)
        cygwin1.dll => /usr/bin/cygwin1.dll (0x61000000)
        cygintl-8.dll => /usr/bin/cygintl-8.dll (0x61730000)
        cygiconv-2.dll => /usr/bin/cygiconv-2.dll (0x63c10000)

Given how ldd works, it's hard to see why executable permissions should
affect it.  ldd starts the executable for debugging and tracks .dlls as
they are loaded.  The executable bit state should have no effect on
that.

cgf

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019