delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2001/04/13/18:33:21

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: <mailto:cygwin-apps-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-apps-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/lists.html#faqs>
Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com
Date: Fri, 13 Apr 2001 18:33:11 -0400
Message-Id: <200104132233.SAA16756@envy.delorie.com>
X-Authentication-Warning: envy.delorie.com: dj set sender to dj AT envy DOT delorie DOT com using -f
From: DJ Delorie <dj AT delorie DOT com>
To: cygwin-apps AT cygwin DOT com
Subject: [roger AT metaphorics DOT com: [Patch] Fix section flags for pe-i386]

Any comments?

------- Start of forwarded message -------
Mailing-List: contact binutils-help AT sourceware DOT cygnus DOT com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:binutils-unsubscribe-dj-ml=delorie DOT com AT sources DOT redhat DOT com>
List-Subscribe: <mailto:binutils-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/binutils/>
List-Post: <mailto:binutils AT sources DOT redhat DOT com>
List-Help: <mailto:binutils-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: binutils-owner AT sources DOT redhat DOT com
Date: Fri, 13 Apr 2001 15:22:39 -0600 (MDT)
From: Roger Sayle <roger AT metaphorics DOT com>
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 <roger AT metaphorics DOT com>

	* 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 -------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019