This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

Re: The COFF patch causes testsuit failure on COFF


On Tue, Mar 27, 2001 at 06:28:05PM -0800, Nick Clifton wrote:
> Hi H.J, Hi Nick
> 
> > The patch
> > 
> > 2001-03-27  Nick Papadonis  <nick@coelacanth.com>
> > 
> >         * read.c (equals): (for COFF) default symbols to being local.
> > 
> > caused testsuite/gas/macros/test1.exp to fail on COFF. test1.s has
> 
> The patch below fixes this regression.
> 
> Unfortunately I have not yet been able to determine why the arm-coff
> port did not show this regression.
> 
> Nick - please can you try this patch out with your m68k-coff toolchain
> and let me know if it reintroduces the bug that your patch was trying
> to fix.
> 

I tried. It didn't work for the m68k-coff test. This one seems to work.

H.J.
----
Index: read.c
===================================================================
RCS file: /work/cvs/gnu/binutils/gas/read.c,v
retrieving revision 1.27
diff -u -p -r1.27 read.c
--- read.c	2001/03/27 23:56:21	1.27
+++ read.c	2001/03/28 02:34:47
@@ -4857,6 +4857,13 @@ equals (sym_name, reassign)
     }
   else
     {
+#ifdef OBJ_COFF
+      int local;
+
+      symbolP = symbol_find (sym_name);
+      local = symbolP == NULL;
+      if (local)
+#endif /* OBJ_COFF */
       symbolP = symbol_find_or_make (sym_name);
       /* Permit register names to be redefined.  */
       if (!reassign
@@ -4866,7 +4873,8 @@ equals (sym_name, reassign)
 
 #ifdef OBJ_COFF
       /* "set" symbols are local unless otherwise specified.  */
-      SF_SET_LOCAL (symbolP);
+      if (local)
+	SF_SET_LOCAL (symbolP);
 #endif /* OBJ_COFF */
 
       pseudo_set (symbolP);


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