public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: ldd fails when dll has no execute permissions
Date: Fri, 24 Feb 2012 20:42:00 -0000	[thread overview]
Message-ID: <20120224204233.GC19740@ednor.casa.cgf.cx> (raw)
In-Reply-To: <1330038220.54804.YahooMailNeo@web36708.mail.mud.yahoo.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

  parent reply	other threads:[~2012-02-24 20:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-23 23:03 cppjavaperl
2012-02-24 11:57 ` Corinna Vinschen
2012-02-24 20:42 ` Christopher Faylor [this message]
2012-02-24 20:52   ` Christopher Faylor
2012-02-24 20:54   ` Corinna Vinschen
2012-03-06 23:53 cppjavaperl
2012-03-07  1:52 ` Christopher Faylor
2012-03-07 17:26 cppjavaperl
2012-03-07 17:57 ` Christopher Faylor
2012-03-07 17:33 cppjavaperl
2012-03-07 19:04 cppjavaperl
2012-03-07 19:16 ` Christopher Faylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120224204233.GC19740@ednor.casa.cgf.cx \
    --to=cgf-use-the-mailinglist-please@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).