From: noer AT cygnus DOT com (Geoffrey Noer) Subject: gcc/ld -s problem fixed in upcoming beta 18... 19 Apr 1997 13:41:03 -0700 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <199704191924.MAA05014.cygnus.gnu-win32@rtl.cygnus.com> Content-Type: text Original-To: gnu-win32 AT cygnus DOT com Original-Cc: jmorriso AT bogomips DOT com, noer AT cygnus DOT com (Geoffrey Noer) In-Reply-To: <199703291036.VAA27869@murlibobo.cs.mu.OZ.AU> from "Fergus Henderson" at Mar 29, 97 09:36:16 pm X-Mailer: ELM [version 2.4 PL23] Original-Sender: owner-gnu-win32 AT cygnus DOT com > > 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 AT cygnus DOT com) fixes this often-reported problem. This patch will make it into beta 18. -- Geoffrey Noer noer AT cygnus DOT 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 AT cygnus DOT com" with one line of text: "help".