Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Fri, 4 Nov 2005 14:11:15 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: BUG: Binutils strip corrupts dll files when using cygwin 1.5.18 and latest snapshot (20051103) Message-ID: <20051104131115.GA2858@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20051104015144 DOT GI17650 AT trixie DOT casa DOT cgf DOT cx> <436B5771 DOT 1070202 AT byu DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <436B5771.1070202@byu.net> User-Agent: Mutt/1.4.2i On Nov 4 05:43, Eric Blake wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > According to Christopher Faylor on 11/3/2005 6:51 PM: > > > > This is not a bug. You can't strip the DLL as it is already stripped > > as much as possible. The debugging information is now in a different > > file. > > Then I would argue that strip should be a no-op and leave the size of > cygwin1.dll unchanged, rather than stripping out whatever was essential > that made the dll invalid. It is not a bug in your philosophy of shipping > cygwin1.dll already stripped, but it IS annoying that binutils can't > recognize that fact and instead corrupts the file. The problem is that there's one section in the file, .gnu_debuglink, which is defined as a debugging section. strip's job is to remove all debug sections. This is usually a simple job to do since the debug sections are typically at the end of the file anyway. Not so the .gnu_debuglink section. By stripping this out, strip generates an invalid PE/COFF file since it leaves an undefined memory hole in the address space of the file, which is a no-no with the somewhat overly simple Windows runtime loader. It's an unlucky case. You could argue that strip should know better than to remove debug sections from the middle of a PE/COFF file but OTOH the Cygwin DLL is a very special case. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/