delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/08/30/12:39:44

From: "Mark E." <snowball3 AT bigfoot DOT com>
To: Laurynas Biveinis <lauras AT softhome DOT net>, djgpp-workers AT delorie DOT com
Date: Wed, 30 Aug 2000 09:26:55 -0400
MIME-Version: 1.0
Subject: Re: difficulties with bnu210b.zip
Message-ID: <39ACD35F.7928.139927@localhost>
In-reply-to: <39ACEDFE.BFD251F7@softhome.net>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Is there a source patch available to download? I could use as210r2.zip, but I
> need to recompile it with symlinks, and yes, I've hit this bug...

If you have the current bnu210s.zip, apply this patch:

*** obj-coff.c.r1	Wed Aug 30 09:24:06 2000
--- obj-coff.c	Sat Aug 26 12:57:26 2000
***************
*** 30,35 ****
--- 30,42 ----
  #define KEEP_RELOC_INFO
  #endif
  
+ /* The BFD_ASSEMBLER version of obj_coff_section will use this macro to set
+    a new section's attributes when a directive has no valid flags or the
+    "w" flag is used. This default should be appropriate for most.  */
+ #ifndef TC_COFF_SECTION_DEFAULT_ATTRIBUTES
+ #define TC_COFF_SECTION_DEFAULT_ATTRIBUTES (SEC_LOAD | SEC_DATA)
+ #endif
+ 
  static void obj_coff_bss PARAMS ((int));
  const char *s_get_name PARAMS ((symbolS * s));
  static void obj_coff_ln PARAMS ((int));
*************** obj_coff_endef (ignore)
*** 725,740 ****
--- 732,755 ----
      case C_ARG:
      case C_REGPARM:
      case C_FIELD:
+ #ifdef TE_GO32
+     case C_MOS:
+     case C_MOE:
+     case C_MOU:
+     case C_EOS:
+ #endif
        SF_SET_DEBUG (def_symbol_in_progress);
        S_SET_SEGMENT (def_symbol_in_progress, absolute_section);
        break;
  
+ #ifndef TE_GO32
      case C_MOS:
      case C_MOE:
      case C_MOU:
      case C_EOS:
        S_SET_SEGMENT (def_symbol_in_progress, absolute_section);
        break;
+ #endif
  
      case C_EXT:
      case C_WEAKEXT:
*************** coff_frob_symbol (symp, punt)
*** 1132,1142 ****
--- 1147,1160 ----
        symbolS *real;
        if (!SF_GET_LOCAL (symp)
  	  && !SF_GET_STATICS (symp)
+ 	  && 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;
+ 	  return;
  	}
        if (!S_IS_DEFINED (symp) && !SF_GET_LOCAL (symp))
  	{
*************** obj_coff_section (ignore)
*** 1430,1436 ****
        /* Set section flags for a new section just created by subseg_new.
           Provide a default if no flags were parsed.  */
        if (flags == SEC_NO_FLAGS)
!         flags = TC_COFF_SECTION_DEFAULT_ATTRIBUTES;
            
  #ifdef COFF_LONG_SECTION_NAMES
        /* Add SEC_LINK_ONCE and SEC_LINK_DUPLICATES_DISCARD to .gnu.linkonce
--- 1448,1454 ----
        /* Set section flags for a new section just created by subseg_new.
           Provide a default if no flags were parsed.  */
        if (flags == SEC_NO_FLAGS)
! 	flags = TC_COFF_SECTION_DEFAULT_ATTRIBUTES;
            
  #ifdef COFF_LONG_SECTION_NAMES
        /* Add SEC_LINK_ONCE and SEC_LINK_DUPLICATES_DISCARD to .gnu.linkonce
*************** coff_frob_section (sec)
*** 1486,1493 ****
  #if !defined(TICOFF)
    if (size & mask)
      {
!       size = (size + mask) & ~mask;
!       bfd_set_section_size (stdoutput, sec, size);
      }
  #endif
  
--- 1504,1523 ----
  #if !defined(TICOFF)
    if (size & mask)
      {
!       bfd_vma new_size;
!       fragS *last;
!       
!       new_size = (size + mask) & ~mask;
!       bfd_set_section_size (stdoutput, sec, new_size);
! 
!       /* If the size had to be rounded up, add some padding in
!          the last non-empty frag.  */
!       fragp = seg_info (sec)->frchainP->frch_root;
!       last = seg_info (sec)->frchainP->frch_last;
!       while (fragp->fr_next != last)
!         fragp = fragp->fr_next;
!       last->fr_address = size;
!       fragp->fr_offset += new_size - size;
      }
  #endif
  

- Raw text -


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