Do not allow symbols to be created in the absolute section.
authorNick Clifton <nickc@redhat.com>
Fri, 20 Sep 2002 06:57:41 +0000 (06:57 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 20 Sep 2002 06:57:41 +0000 (06:57 +0000)
gas/ChangeLog
gas/symbols.c

index ab054abdb07b12923f668c2e706e72eb3a134e4d..9b4fb4be93ce76876eb0fabad6e120f196338c3a 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-20  Nick Clifton  <nickc@redhat.com>
+
+       * symbols.c (colon): Do not allow symbols to be created in the
+       absolute section.
+
 2002-09-20  Alan Modra  <amodra@bigpond.net.au>
 
        * expr.c (expr): Simplify foo-foo here.
index 6d8147ce84ab48a13d189513b64bb288d73486f9..c84b5b3a00e045e3b88631419ea55cc673a24283 100644 (file)
@@ -287,7 +287,13 @@ colon (sym_name)           /* Just seen "x:" - rattle symbols & frags.  */
 {
   register symbolS *symbolP;   /* Symbol we are working with.  */
 
-  /* Sun local labels go out of scope whenever a non-local symbol is
+  if (now_seg == absolute_section)
+    {
+      as_bad (_("cannot define symbol `%s' in absolute section"), sym_name);
+      return NULL;
+    }
+
+    /* Sun local labels go out of scope whenever a non-local symbol is
      defined.  */
   if (LOCAL_LABELS_DOLLAR)
     {