* write.c (relax_segment): Give an error if a .space symbol is
authorIan Lance Taylor <ian@airs.com>
Fri, 31 Jan 1997 15:47:41 +0000 (15:47 +0000)
committerIan Lance Taylor <ian@airs.com>
Fri, 31 Jan 1997 15:47:41 +0000 (15:47 +0000)
common or undefined.

* read.c (read_a_source_file): Don't handle mri_pending_align if
the handler is s_globl or s_ignore.

gas/ChangeLog
gas/read.c
gas/write.c

index 86a744a2b247a46ea47d0a27c47fceb73d2dd8f1..171ea2db5551b59abdf41dc39131de8df9914488 100644 (file)
@@ -1,3 +1,11 @@
+Fri Jan 31 10:46:14 1997  Ian Lance Taylor  <ian@cygnus.com>
+
+       * write.c (relax_segment): Give an error if a .space symbol is
+       common or undefined.
+
+       * read.c (read_a_source_file): Don't handle mri_pending_align if
+       the handler is s_globl or s_ignore.
+
 Thu Jan 30 11:46:59 1997  Fred Fish  <fnf@cygnus.com>
 
        * config/tc-d10v.c (find_opcode): Remove unused variable "numops".
index a1b3bdd936ebd461f131a4710ce59eacda90cd80..5e7042936acb99f077a94593b3b03a9d3c0d4a0c 100644 (file)
@@ -719,7 +719,9 @@ read_a_source_file (name)
                                    || pop->poc_handler == s_ifc
                                    || pop->poc_handler == s_ifeqs
                                    || pop->poc_handler == s_else
-                                   || pop->poc_handler == s_endif)))
+                                   || pop->poc_handler == s_endif
+                                   || pop->poc_handler == s_globl
+                                   || pop->poc_handler == s_ignore)))
                        {
                          do_align (1, (char *) NULL, 0);
                          mri_pending_align = 0;
index 7f2b74d4cc26044e3275017080a97a6d6f6e1320..0cd68c30f5ab1fa4768fdbadc582143e2eba74c3 100644 (file)
@@ -2202,8 +2202,11 @@ relax_segment (segment_frag_root, segment)
                if (symbolP)
                  {
                    growth = S_GET_VALUE (symbolP);
-                   if (symbolP->sy_frag != &zero_address_frag)
-                     as_bad (".space specifies non-absolute value");
+                   if (symbolP->sy_frag != &zero_address_frag
+                       || S_IS_COMMON (symbolP)
+                       || ! S_IS_DEFINED (symbolP))
+                     as_bad_where (fragP->fr_file, fragP->fr_line,
+                                   ".space specifies non-absolute value");
                    fragP->fr_symbol = 0;
                    if (growth < 0)
                      {