OSDN Git Service

(assign_parms): Don't call promote_mode on arg unless
[pf3gnuchains/gcc-fork.git] / gcc / mips-tfile.c
index af4c09d..5074e9b 100644 (file)
@@ -2,7 +2,7 @@
    contain debugging information specified by the GNU compiler
    in the form of comments (the mips assembler does not support
    assembly access to debug information).
-   Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1993, 1994. 1995 Free Software Foundation, Inc.
    Contributed by Michael Meissner, meissner@osf.org
    
 This file is part of GNU CC.
@@ -599,9 +599,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 \f
 
 #ifdef __STDC__
-#include "gstdarg.h"
+#include <stdarg.h>
 #else
-#include "gvarargs.h"
+#include <varargs.h>
 #endif
 #include "config.h"
 #include <stdio.h>
@@ -671,8 +671,8 @@ extern PTR_T        xrealloc        __proto((PTR_T, Size_t));
 extern void    xfree           __proto((PTR_T));
 
 #ifdef HAVE_VPRINTF
-extern void    fatal           PVPROTO((char *format, ...));
-extern void    error           PVPROTO((char *format, ...));
+extern void    fatal           PVPROTO((const char *format, ...));
+extern void    error           PVPROTO((const char *format, ...));
 #else
 /* We must not provide any prototype here, even if ANSI C.  */
 extern void    fatal           __proto(());
@@ -1159,7 +1159,7 @@ static efdr_t init_file =
     langC,             /* lang:        language for this file */
     1,                 /* fMerge:      whether this file can be merged */
     0,                 /* fReadin:     true if read in (not just created) */
-#if BYTES_BIG_ENDIAN
+#ifdef HOST_WORDS_BIG_ENDIAN
     1,                 /* fBigendian:  if 1, compiled on big endian machine */
 #else
     0,                 /* fBigendian:  if 1, compiled on big endian machine */
@@ -2359,7 +2359,7 @@ add_aux_sym_tir (t, state, hash_tbl)
                              : (t->sizes[i] * 8) / t->dimensions[i]);
     };
 
-  /* NOTE:  Mips documentation claism that the bitfield width goes here.
+  /* NOTE:  Mips documentation claims that the bitfield width goes here.
      But it needs to be emitted earlier. */
 
   return ret;
@@ -3332,7 +3332,7 @@ parse_def (name_start)
     }
 
   else if (symbol_type == st_Member && t.num_sizes - t.extra_sizes == 1)
-    { /* Is this a bitfield?  This is indicated by a structure memeber
+    { /* Is this a bitfield?  This is indicated by a structure member
         having a size field that isn't an array.  */
 
       t.bitfield = 1;
@@ -3632,7 +3632,7 @@ mark_stabs (start)
 {
   if (!stabs_seen)
     {
-      /* Add a dummy @stabs dymbol. */
+      /* Add a dummy @stabs symbol. */
       stabs_seen = 1;
       (void) add_local_symbol (stabs_symbol,
                               stabs_symbol + sizeof (stabs_symbol),
@@ -3990,7 +3990,43 @@ update_headers __proto((void))
        file_ptr != (efdr_t *)0;
        file_ptr = file_ptr->next_file)
     {
+      register SYMR *sym_start;
+      register SYMR *sym;
+      register SYMR *sym_end_p1;
+      register FDR *fd_ptr = file_ptr->orig_fdr;
+
       cur_file_ptr = file_ptr;
+
+      /* Copy st_Static symbols from the original local symbol table if
+        they did not get added to the new local symbol table.
+        This happens with stabs-in-ecoff or if the source file is
+        compiled without debugging.  */
+      sym_start = ORIG_LSYMS (fd_ptr->isymBase);
+      sym_end_p1 = sym_start + fd_ptr->csym;
+      for (sym = sym_start; sym < sym_end_p1; sym++)
+       {
+         if ((st_t)sym->st == st_Static)
+           {
+             register char *str = ORIG_LSTRS (fd_ptr->issBase + sym->iss);
+             register Size_t len = strlen (str);
+             register shash_t *hash_ptr;
+
+             /* Ignore internal labels.  */
+             if (str[0] == '$' && str[1] == 'L')
+               continue;
+             hash_ptr = hash_string (str,
+                                     (Ptrdiff_t)len,
+                                     &file_ptr->shash_head[0],
+                                     (symint_t *)0);
+             if (hash_ptr == (shash_t *)0)
+               {
+                 (void) add_local_symbol (str, str + len,
+                                          (st_t)sym->st, (sc_t)sym->sc,
+                                          (symint_t)sym->value,
+                                          (symint_t)indexNil);
+               }
+           }
+       }
       (void) add_local_symbol ((const char *)0, (const char *)0,
                               st_End, sc_Text,
                               (symint_t)0,
@@ -5570,7 +5606,7 @@ free_thead (ptr)
 
 /*VARARGS*/
 void
-fatal VPROTO((char *format, ...))
+fatal VPROTO((const char *format, ...))
 {
 #ifndef __STDC__
   char *format;
@@ -5600,7 +5636,7 @@ fatal VPROTO((char *format, ...))
 
 /*VARARGS*/
 void
-error VPROTO((char *format, ...))
+error VPROTO((const char *format, ...))
 {
 #ifndef __STDC__
   char *format;