From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19394 invoked by alias); 20 Apr 2012 16:28:05 -0000 Received: (qmail 18136 invoked by uid 22791); 20 Apr 2012 16:27:35 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Fri, 20 Apr 2012 16:27:21 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 580C42C2B14; Fri, 20 Apr 2012 18:27:18 +0200 (CEST) Date: Fri, 20 Apr 2012 16:28:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Why /usr/bin/*.dll must be executable? Message-ID: <20120420162718.GK22155@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <4F915E65.8070608@gmail.com> <4F918C2A.2080300@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4F918C2A.2080300@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-04/txt/msg00433.txt.bz2 On Apr 21 00:17, De-Jian Zhao wrote: > On 2012-4-20 21:07, Václav Zeman wrote: > >On 20 April 2012 15:02, De-Jian Zhao wrote: > >>Hi, > >> > >>When I type "cyg" and Tab, many executables starting with "cyg" are listed > >>(Display all 262 possibilities? (y or n) y). I find that many of them are > >>*.dll libraries under /usr/bin/. This is inconvenient to find the real > >>executable applications (*.exe). Since *.dll files are only libraries, they > >>are not necessary to have the attribute of "x". Thus, I run the command > >>"chmod a-x /usr/bin/*.dll". Unexpectedly, cygwin is corrupted. I closed the > >>terminal and failed to restart Cygwin. I started my older version of Cygwin > >>(I did not deleted it after installing a new version), and added "x" to the > >>previous *.dll files. The dead Cygwin revived. > >> > >>I am confused why /usr/bin/*.dll should be executable. I thought they were > >>only library files. When I tried to run a dll file, bash says "cannot > >>execute binary file". Are there some hidden stories? > >DLLs are executables thus they need the +x bit. This is a Windows thing. > > > > If this is a windows thing, removing the x bit should not affect > Cygwin. Instead, Cygwin is corrupted after removing the x bit. Windows requires the x bit for DLLs to be loadable as executable code into the address space of a process. As Václav wrote, it's a Windows thing. 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