These patches have been applied to this package:

diff -cp -r d:/djgpp/gnu/binutils-2.11.2/bfd/coffcode.h c:/djgpp/gnu/binutl-2.112/bfd/coffcode.h
*** d:/djgpp/gnu/binutils-2.11.2/bfd/coffcode.h	Mon Jun 11 06:04:02 2001
--- c:/djgpp/gnu/binutl-2.112/bfd/coffcode.h	Thu Jun 21 19:58:30 2001
*************** coff_add_missing_symbols (abfd)
*** 3272,3277 ****
--- 3272,3281 ----
  
  #endif /* 0 */
  
+ #if defined (__MSDOS__)
+ #define COFF_PAD_SECTION_HEADERS
+ #endif
+ 
  /* SUPPRESS 558 */
  /* SUPPRESS 529 */
  static boolean
*************** coff_write_object_contents (abfd)
*** 3653,3658 ****
--- 3657,3675 ----
      }
  #endif
  
+ #ifdef COFF_PAD_SECTION_HEADERS
+   if ((abfd->flags & EXEC_P) != 0)
+     {
+       file_ptr cur_ptr = scn_base
+                          + abfd->section_count * bfd_coff_scnhsz (abfd);
+       long fill_size = (abfd->sections->filepos - cur_ptr);
+       bfd_byte *b = bfd_zmalloc (fill_size);
+       if (b)
+         bfd_write ((PTR)b, 1, fill_size, abfd);
+       free (b);
+     }
+ #endif
+ 
    /* OK, now set up the filehdr...  */
  
    /* Don't include the internal abs section in the section count */
diff -cp -r d:/djgpp/gnu/binutils-2.11.2/bfd/cofflink.c c:/djgpp/gnu/binutl-2.112/bfd/cofflink.c
*** d:/djgpp/gnu/binutils-2.11.2/bfd/cofflink.c	Wed Jun  6 23:08:24 2001
--- c:/djgpp/gnu/binutl-2.112/bfd/cofflink.c	Sun Jul  1 14:45:52 2001
*************** _bfd_coff_link_input_bfd (finfo, input_b
*** 1501,1506 ****
--- 1501,1517 ----
  	    }
  	}
  
+ #ifndef COFF_WITH_PE
+       /* Skip section symbols from sections that are marked as discarded.  */
+       if (!skip && isym.n_sclass == C_STAT && isym.n_type == T_NULL
+           && isym.n_numaux > 0)
+         {
+           if ((*secpp)->output_section == bfd_abs_section_ptr
+               || (*secpp)->kept_section)
+             skip = true;
+         }
+ #endif
+ 
        /* If we stripping debugging symbols, and this is a debugging
           symbol, then skip it.  FIXME: gas sets the section to N_ABS
           for some types of debugging symbols; I don't know if this is
diff -cp -r d:/djgpp/gnu/binutils-2.11.2/gas/config/obj-coff.c c:/djgpp/gnu/binutl-2.112/gas/config/obj-coff.c
*** d:/djgpp/gnu/binutils-2.11.2/gas/config/obj-coff.c	Mon Jun 11 06:04:48 2001
--- c:/djgpp/gnu/binutl-2.112/gas/config/obj-coff.c	Thu Jun 21 17:34:38 2001
*************** coff_frob_symbol (symp, punt)
*** 1180,1186 ****
  	  && S_GET_STORAGE_CLASS (symp) != C_LABEL
  	  && symbol_constant_p(symp)
  	  && (real = symbol_find_base (S_GET_NAME (symp), DO_NOT_STRIP))
! 	  && real != symp)
  	{
  	  c_symbol_merge (symp, real);
  	  *punt = 1;
--- 1180,1187 ----
  	  && S_GET_STORAGE_CLASS (symp) != C_LABEL
  	  && symbol_constant_p(symp)
  	  && (real = symbol_find_base (S_GET_NAME (symp), DO_NOT_STRIP))
! 	  && real != symp
! 	  && S_GET_STORAGE_CLASS (real) == C_NULL)
  	{
  	  c_symbol_merge (symp, real);
  	  *punt = 1;
diff -cp -r d:/djgpp/gnu/binutils-2.11.2/ld/scripttempl/i386go32.sc c:/djgpp/gnu/binutl-2.112/ld/scripttempl/i386go32.sc
*** d:/djgpp/gnu/binutils-2.11.2/ld/scripttempl/i386go32.sc	Wed Dec  6 11:39:52 2000
--- c:/djgpp/gnu/binutl-2.112/ld/scripttempl/i386go32.sc	Sat Apr 14 23:28:04 2001
*************** SECTIONS
*** 23,28 ****
--- 23,29 ----
  {
    .text ${RELOCATING+ ${TARGET_PAGE_SIZE}+SIZEOF_HEADERS} : {
      *(.text)
+     ${RELOCATING+*(.text.*)}
      ${RELOCATING+*(.gnu.linkonce.t*)}
      *(.const*)
      *(.ro*)
*************** SECTIONS
*** 40,45 ****
--- 41,47 ----
      *(.dtor)
      djgpp_last_dtor = . ;}
      *(.data)
+     ${RELOCATING+*(.data.*)}
  
      ${RELOCATING+*(.gcc_exc*)}
      ${RELOCATING+___EH_FRAME_BEGIN__ = . ;}
*************** SECTIONS
*** 60,65 ****
--- 62,70 ----
      ${RELOCATING+ end = . ; PROVIDE(_end = .) ;}
      ${RELOCATING+ . = ALIGN(${SEGMENT_SIZE});}
    }
+   /* Stabs debugging sections.  */
+   .stab 0 : { *(.stab) }
+   .stabstr 0 : { *(.stabstr) }
    /* DWARF 2 */
    .debug_aranges  0 : { *(.debug_aranges) }
    .debug_pubnames 0 : { *(.debug_pubnames) }
*** d:/djgpp/gnu/binutils-2.11.2/bfd/coff-go32.c	Tue Aug 21 13:22:34 2001
--- c:/djgpp/gnu/binutl-2.112/bfd/coff-go32.c	Tue Aug 21 12:44:26 2001
*************** Foundation, Inc., 59 Temple Place - Suit
*** 36,41 ****
  { COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.t"), \
    COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
  { COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.r"), \
!   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }
  
  #include "coff-i386.c"
--- 36,43 ----
  { COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.t"), \
    COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
  { COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.r"), \
!   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
! { COFF_SECTION_NAME_PARTIAL_MATCH (".debug"), \
!   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }
  
  #include "coff-i386.c"
*** d:/djgpp/gnu/binutils-2.11.2/bfd/coff-stgo32.c	Tue Aug 21 13:22:46 2001
--- c:/djgpp/gnu/binutl-2.112/bfd/coff-stgo32.c	Tue Aug 21 12:44:24 2001
***************
*** 47,53 ****
  { COFF_SECTION_NAME_EXACT_MATCH (".data"), \
    COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
  { COFF_SECTION_NAME_EXACT_MATCH (".text"), \
!   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }
  
  #include "bfd.h"
  
--- 47,56 ----
  { COFF_SECTION_NAME_EXACT_MATCH (".data"), \
    COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
  { COFF_SECTION_NAME_EXACT_MATCH (".text"), \
!   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
! { COFF_SECTION_NAME_PARTIAL_MATCH (".debug"), \
!   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }
! 
  
  #include "bfd.h"
  
