* config/obj-ecoff.c (ecoff_frob_file): Discard all open scopes,
authorIan Lance Taylor <ian@airs.com>
Thu, 15 Jul 1993 22:01:27 +0000 (22:01 +0000)
committerIan Lance Taylor <ian@airs.com>
Thu, 15 Jul 1993 22:01:27 +0000 (22:01 +0000)
with a warning.

gas/ChangeLog
gas/config/obj-ecoff.c

index f4d86ea2fe3db8e98864c645362e4d6cbbde020d..1217c382007dfe2fc8bdeaa68d534196fdaa72c1 100644 (file)
@@ -1,5 +1,8 @@
 Thu Jul 15 11:51:03 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
 
+       * config/obj-ecoff.c (ecoff_frob_file): Discard all open scopes,
+       with a warning.
+
        * config/obj-coffbfd.c (fixup_segment): If TC_M88K, don't adjust
        by md_pcrel_from if we are relocating against a symbol (we still
        need md_pcrel_from for a PC relative relocation within the same
index 69ecbc21c64d25edf179c44f99a2b1eef3995beb..30d292f234143d95f08854ab5bc0acb02562202c 100644 (file)
@@ -4415,6 +4415,7 @@ ecoff_frob_file ()
   tag_t *ptag;
   tag_t *ptag_next;
   efdr_t *fil_ptr;
+  int end_warning;
   efdr_t *hold_file_ptr;
   proc_t * hold_proc_ptr;
   bfd_vma addr;
@@ -4454,11 +4455,21 @@ ecoff_frob_file ()
   /* Output an ending symbol for all the files.  We have to do this
      here for the last file, so we may as well do it for all of the
      files.  */
+  end_warning = 0;
   for (fil_ptr = first_file;
        fil_ptr != (efdr_t *) NULL;
        fil_ptr = fil_ptr->next_file)
     {
       cur_file_ptr = fil_ptr;
+      while (cur_file_ptr->cur_scope->prev != (scope_t *) NULL)
+       {
+         cur_file_ptr->cur_scope = cur_file_ptr->cur_scope->prev;
+         if (! end_warning)
+           {
+             as_warn ("Missing .end or .bend at end of file");
+             end_warning = 1;
+           }
+       }
       (void) add_ecoff_symbol ((const char *) NULL,
                               st_End, sc_Text,
                               (symbolS *) NULL,
This page took 0.032866 seconds and 4 git commands to generate.