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, 17 Jun 2005 10:37:51 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Problem with using stripped cygwin1.dll built from CVS Message-ID: <20050617143751.GE8532@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com References: <42A6298E DOT 303 AT acm DOT org> <42A62DAE DOT F4153556 AT dessent DOT net> <42A632C5 DOT 7040306 AT acm DOT org> <20050608084920 DOT GN23172 AT calimero DOT vinschen DOT de> <20050608143656 DOT GB17698 AT trixie DOT casa DOT cgf DOT cx> <20050608214341 DOT GA21349 AT trixie DOT casa DOT cgf DOT cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i On Fri, Jun 17, 2005 at 09:29:48AM -0500, Brian Ford wrote: >On Wed, 8 Jun 2005, Christopher Faylor wrote: >>On Wed, Jun 08, 2005 at 10:36:56AM -0400, Christopher Faylor wrote: >>>I understand the problem. It's a binutils bug that I'm investigating. >>>Either gas or ld is marking NOLOAD sections as "read only" and that is >>>causing windows to actually load them into memory. >> >>There's a new "test" version of binutils available which seems to fix >>this problem. I'm awaiting approval for a patch in the binutils >>mailing list before making this version official. >> >>This turns out to have been a long-time bug in binutils, AFAICT. The >>debug sections that the GNU linker produces were not properly marked as >>"noload" so debug data was actually loaded into memory. > >I wish I would have known this was possible while working on DWARF 2 >debugging. Everything I read stated: "If it has a section header, >Windows' brain dead loader will load it regardless of section >attributes". I hope it really works on all supported platforms. It's a documented field in PE's section header, so I don't see why it wouldn't work. The only brain-dead thing that the loader does is to go ahead and load a section into memory if it is marked as readable or writable as well as noload. >Do the RVA's for these sections still have to be consecutive? As far as I can tell, yes. Anything else seems to result in a non-loadable binary. But, I didn't investigate this too thoroughly so it is possible that there's another binutils bug lurking there. cgf -- 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/