Subject: gcc/ld -s problem fixed in upcoming beta 18...
From: [email-masked] (Geoffrey Noer)

19 Apr 1997 13:41:03 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Content-Type: text
Original-To: [email-masked]
Original-Cc: [email-masked], [email-masked] (Geoffrey Noer)
In-Reply-To: <[email-masked]> from "Fergus Henderson" at Mar 29, 97 09:36:16 pm
X-Mailer: ELM [version 2.4 PL23]
Original-Sender: [email-masked]

> > i586-cygwin32-gcc -s -o foo.exe foo.c 
> > 
> > produces a corrupt executable that windows NT won't run. 

The following patch to bfd from Ian Lance Taylor ([email-masked]) fixes
this often-reported problem.  This patch will make it into beta 18.

-- 
Geoffrey Noer
[email-masked]

Index: coffcode.h
===================================================================
RCS file: /cvs/cvsfiles/devo/bfd/coffcode.h,v
retrieving revision 1.292
diff -u -r1.292 coffcode.h
--- coffcode.h	1997/04/01 04:30:46	1.292
+++ coffcode.h	1997/04/18 03:35:31
@@ -2288,6 +2288,14 @@
 	}
 #endif
 
+#ifdef COFF_IMAGE_WITH_PE
+      /* For PE we need to make sure we pad out to the aligned
+         _raw_size, in case the caller only writes out data to the
+         unaligned _raw_size.  */
+      if (pei_section_data (abfd, current)->virt_size < current->_raw_size)
+	align_adjust = true;
+#endif
+
 #ifdef _LIB
       /* Force .lib sections to start at zero.  The vma is then
 	 incremented in coff_set_section_contents.  This is right for
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".