* ecoff.c (ecoff_build_symbols): Don't generate a local ECOFF
authorIan Lance Taylor <ian@airs.com>
Mon, 27 Jan 1997 22:41:43 +0000 (22:41 +0000)
committerIan Lance Taylor <ian@airs.com>
Mon, 27 Jan 1997 22:41:43 +0000 (22:41 +0000)
symbol for a common symbol.

gas/ChangeLog
gas/ecoff.c

index e2aece66e0abbf92458dcdfca4ece621044c0f57..c29e5e28b8e8409c018f2c6f62ef6a012d215a95 100644 (file)
@@ -1,3 +1,8 @@
+Mon Jan 27 17:41:20 1997  Ian Lance Taylor  <ian@cygnus.com>
+
+       * ecoff.c (ecoff_build_symbols): Don't generate a local ECOFF
+       symbol for a common symbol.
+
 Wed Jan 22 10:39:39 1997  Doug Evans  <dje@canuck.cygnus.com>
 
        Patch presumed to have been checked in awhile ago but wasn't.
index 960032ea0dba7b3994a2fcdde0d06fa8880ef981..e8d66c318e433ebc54d844b6a968ecc7f9d1fdf6 100644 (file)
@@ -3612,8 +3612,7 @@ ecoff_stab (sec, what, string, type, other, desc)
            }
          else
            {
-             as_bad (".stabs expression too complex");
-             sym = NULL;
+             sym = make_expr_symbol (&exp);
              value = 0;
              addend = 0;
            }
@@ -4165,6 +4164,11 @@ ecoff_build_symbols (backend, buf, bufend, offset)
                          && ! ECOFF_IS_STAB (&sym_ptr->ecoff_sym.asym))
                        local = 0;
 
+                     /* This is just an external symbol if it is a
+                         common symbol.  */
+                     if (S_IS_COMMON (as_sym))
+                       local = 0;
+
                      /* If an st_end symbol has an associated gas
                         symbol, then it is a local label created for
                         a .bend or .end directive.  Stabs line
@@ -4231,6 +4235,12 @@ ecoff_build_symbols (backend, buf, bufend, offset)
                          sym_ptr->ecoff_sym.asym.value =
                            (S_GET_VALUE (as_sym)
                             - S_GET_VALUE (begin_ptr->as_sym));
+
+                         /* If the size is odd, this is probably a
+                             mips16 function; force it to be even.  */
+                         if ((sym_ptr->ecoff_sym.asym.value & 1) != 0)
+                           ++sym_ptr->ecoff_sym.asym.value;
+
 #ifdef S_SET_SIZE
                          S_SET_SIZE (begin_ptr->as_sym,
                                      sym_ptr->ecoff_sym.asym.value);