This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gcc/ld -s problem fixed in upcoming beta 18...


> > 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 (ian@cygnus.com) fixes
this often-reported problem.  This patch will make it into beta 18.

-- 
Geoffrey Noer
noer@cygnus.com


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
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]