Treat a .ln directive outside of a function as a .appline directive.
authorNick Clifton <nickc@redhat.com>
Sat, 30 Jun 2001 10:09:40 +0000 (10:09 +0000)
committerNick Clifton <nickc@redhat.com>
Sat, 30 Jun 2001 10:09:40 +0000 (10:09 +0000)
gas/ChangeLog
gas/config/obj-coff.c

index f7484949fe7955007f427fab82e1770cefd3e83e..71a50c7756dc12b9cd8fd2c9950c32dd0220dda7 100644 (file)
@@ -1,3 +1,8 @@
+2001-06-28  Nick Clifton  <nickc@cambridge.redhat.com>
+
+       * config/obj-coff.c (obj_coff_ln): Treat a .ln directive
+       outside of a function as a .appline directive.
+
 2001-06-28  Eric Christopher <echristo@redhat.com>
            H.J. Lu  <hjl@gnu.org>
 
index 8de8c62ca92aec9df2c1f11e9fd58bc24093f165..30a5fe899858dbcb4a0f36f619d5950df1a8a734 100644 (file)
@@ -493,13 +493,13 @@ obj_coff_ln (appline)
     }
 
   l = get_absolute_expression ();
-  if (!appline)
-    {
-      add_lineno (frag_now, frag_now_fix (), l);
-    }
 
-  if (appline)
+  /* If there is no lineno symbol, treat a .ln
+     directive as if it were a .appline directive.  */
+  if (appline || current_lineno_sym == NULL)
     new_logical_line ((char *) NULL, l - 1);
+  else
+    add_lineno (frag_now, frag_now_fix (), l);
 
 #ifndef NO_LISTING
   {