Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com List-Subscribe: List-Archive: List-Post: List-Help: , Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com Date: Fri, 13 Apr 2001 18:38:57 -0400 From: Christopher Faylor To: cygwin-apps AT cygwin DOT com Subject: Re: [roger AT metaphorics DOT com: [Patch] Fix section flags for pe-i386] Message-ID: <20010413183857.A2036@redhat.com> Reply-To: cygwin-apps AT cygwin DOT com Mail-Followup-To: cygwin-apps AT cygwin DOT com References: <200104132233 DOT SAA16756 AT envy DOT delorie DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.11i In-Reply-To: <200104132233.SAA16756@envy.delorie.com>; from dj@delorie.com on Fri, Apr 13, 2001 at 06:33:11PM -0400 On Fri, Apr 13, 2001 at 06:33:11PM -0400, DJ Delorie wrote: >Any comments? Sounds good to me. I'd love to get rid of those warnings. If you apply the patch, I could make a new binutils release just to see if there are any complaints from the user community. cgf >------- Start of forwarded message ------- >Mailing-List: contact binutils-help AT sourceware DOT cygnus DOT com; run by ezmlm >Precedence: bulk >List-Unsubscribe: >List-Subscribe: >List-Archive: >List-Post: >List-Help: , >Sender: binutils-owner AT sources DOT redhat DOT com >Date: Fri, 13 Apr 2001 15:22:39 -0600 (MDT) >From: Roger Sayle >X-Sender: roger AT daylight DOT daylight DOT com >To: binutils AT sources DOT redhat DOT com >Subject: [Patch] Fix section flags for pe-i386 >Content-Type: TEXT/PLAIN; charset=US-ASCII > > >The bfd library currently thinks that the SEC_READONLY section flag is >not applicable to pe-i386 coff files, such as those used by cygwin. This >means that objects files created by binutils never have the READONLY flag >set for ".text" sections. This causes the Microsoft linker, LINK.EXE, >to issue warnings when linking cygwin object files and libraries with >native object files and libraries. > >Warning LNK4078: multiple ".text" sections found with different >attributes. > >The "obvious" patch is to allow SEC_READONLY section flag to be used on >pe-i386 and pei-i386 targets. This cures the warnings, and has been >tested on i586-pc-cygwin and i686-pc-cygwin with MSVC 5.0 and 6.0. > >Just in case this flag actually affected behaviour, I also tested with >bootstraps of binutils and gcc, and built several local applications >and DLLs, both with and without the "-mno-cygwin" flag, on Windows95 >and Windows ME. There were no regressions in several days of testing. > >A one line bug fix shouldn't require a copyright assigment. > > > >2001-04-13 Roger Sayle > > * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable > section flag on pe-i386 targets. > > > >*** bfd/coff-i386.c.orig Fri Apr 13 14:58:49 2001 >- --- bfd/coff-i386.c Fri Apr 13 14:59:16 2001 >*************** >*** 1,6 **** > /* BFD back-end for Intel 386 COFF files. > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, >! 2000 > Free Software Foundation, Inc. > Written by Cygnus Support. > >- --- 1,6 ---- > /* BFD back-end for Intel 386 COFF files. > Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, >! 2000, 2001 > Free Software Foundation, Inc. > Written by Cygnus Support. > >*************** >*** 576,582 **** > > (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */ > #ifdef COFF_WITH_PE >! | SEC_LINK_ONCE | SEC_LINK_DUPLICATES > #endif > | SEC_CODE | SEC_DATA), > >- --- 576,582 ---- > > (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */ > #ifdef COFF_WITH_PE >! | SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_READONLY > #endif > | SEC_CODE | SEC_DATA), > > > >Roger >- -- >Roger Sayle, E-mail: roger AT metaphorics DOT com >Bioinformatics Group, Metaphorics, WWW: http://www.metaphorics.com/ >Office 104, 441 Greg Avenue, Tel: (+1) 505-954-3281 >Santa Fe, New Mexico, 87501. Fax: (+1) 505-989-1200 >------- End of forwarded message ------- -- cgf AT cygnus DOT com Red Hat, Inc. http://sources.redhat.com/ http://www.redhat.com/