Ignore:
Timestamp:
Aug 16, 2003, 6:59:22 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/gas/ecoff.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* ECOFF debugging support.
    2    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
     2   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
    33   Free Software Foundation, Inc.
    44   Contributed by Cygnus Support.
     
    3838#include "aout/stab_gnu.h"
    3939
    40 #include <ctype.h>
     40#include "safe-ctype.h"
    4141
    4242/* Why isn't this in coff/sym.h?  */
     
    15611561
    15621562  if (len >= PAGE_USIZE)
    1563     as_fatal (_("String too big (%lu bytes)"), len);
     1563    as_fatal (_("string too big (%lu bytes)"), len);
    15641564
    15651565  hash_ptr = (shash_t *) hash_find (hash_tbl, str);
     
    15871587      err = hash_insert (hash_tbl, str, (char *) hash_ptr);
    15881588      if (err)
    1589         as_fatal (_("Inserting \"%s\" into string hash table: %s"),
     1589        as_fatal (_("inserting \"%s\" into string hash table: %s"),
    15901590                  str, err);
    15911591    }
     
    20492049      char *perm;
    20502050
    2051       perm = xmalloc ((unsigned long) (strlen (tag) + 1));
    2052       strcpy (perm, tag);
     2051      perm = xstrdup (tag);
    20532052      hash_ptr = allocate_shash ();
    20542053      err = hash_insert (tag_hash, perm, (char *) hash_ptr);
    20552054      if (err)
    2056         as_fatal (_("Inserting \"%s\" into tag hash table: %s"),
     2055        as_fatal (_("inserting \"%s\" into tag hash table: %s"),
    20572056                  tag, err);
    20582057      hash_ptr->string = perm;
     
    22352234        debug_type = DEBUG_ECOFF;
    22362235    }
    2237   else
     2236  else if (debug_type == DEBUG_UNSPECIFIED)
    22382237    debug_type = DEBUG_NONE;
    22392238
     
    23132312
    23142313      if (strlen (file_name) > PAGE_USIZE - 2)
    2315         as_fatal (_("Filename goes over one page boundary."));
     2314        as_fatal (_("filename goes over one page boundary"));
    23162315
    23172316      /* Push the start of the filename. We assume that the filename
     
    25582557    as_warn (_(".def pseudo-op used inside of .def/.endef; ignored"));
    25592558  else if (*name == '\0')
    2560     as_warn (_("Empty symbol name in .def; ignored"));
     2559    as_warn (_("empty symbol name in .def; ignored"));
    25612560  else
    25622561    {
     
    25652564      if (coff_tag != (char *) NULL)
    25662565        free (coff_tag);
    2567       coff_sym_name = (char *) xmalloc ((unsigned long) (strlen (name) + 1));
    2568       strcpy (coff_sym_name, name);
     2566     
     2567      coff_sym_name = xstrdup (name);
    25692568      coff_type = type_info_init;
    25702569      coff_storage_class = sc_Nil;
     
    26112610          if (*input_line_pointer != '\n'
    26122611              && *input_line_pointer != ';')
    2613             as_warn (_("Badly formed .dim directive"));
     2612            as_warn (_("badly formed .dim directive"));
    26142613          break;
    26152614        }
     
    26242623      if (coff_type.num_dims >= N_TQ)
    26252624        {
    2626           as_warn (_("Too many .dim entries"));
     2625          as_warn (_("too many .dim entries"));
    26272626          break;
    26282627        }
     
    26862685          if (*input_line_pointer != '\n'
    26872686              && *input_line_pointer != ';')
    2688             as_warn (_("Badly formed .size directive"));
     2687            as_warn (_("badly formed .size directive"));
    26892688          break;
    26902689        }
     
    26992698      if (coff_type.num_sizes >= N_TQ)
    27002699        {
    2701           as_warn (_("Too many .size entries"));
     2700          as_warn (_("too many .size entries"));
    27022701          break;
    27032702        }
     
    27402739             There would still be a limit: the .type argument can not
    27412740             be infinite.  */
    2742           as_warn (_("The type of %s is too complex; it will be simplified"),
     2741          as_warn (_("the type of %s is too complex; it will be simplified"),
    27432742                   coff_sym_name);
    27442743          break;
     
    27982797  name_end = get_symbol_end ();
    27992798
    2800   coff_tag = (char *) xmalloc ((unsigned long) (strlen (name) + 1));
    2801   strcpy (coff_tag, name);
     2799  coff_tag = xstrdup (name);
    28022800
    28032801  *input_line_pointer = name_end;
     
    28822880      if (coff_type.num_sizes != 1 || diff < 0)
    28832881        {
    2884           as_warn (_("Bad COFF debugging info"));
     2882          as_warn (_("bad COFF debugging information"));
    28852883          return;
    28862884        }
     
    29312929          if (coff_tag == (char *) NULL)
    29322930            {
    2933               as_warn (_("No tag specified for %s"), name);
     2931              as_warn (_("no tag specified for %s"), name);
    29342932              return;
    29352933            }
     
    29632961          != 1)
    29642962        {
    2965           as_warn (_("Bad COFF debugging information"));
     2963          as_warn (_("bad COFF debugging information"));
    29662964          return;
    29672965        }
     
    30313029  char *name;
    30323030  char name_end;
    3033   register int ch;
    30343031  symbolS *ent;
    30353032
     
    30513048  name_end = get_symbol_end ();
    30523049
    3053   ch = *name;
    3054   if (! is_name_beginner (ch))
     3050  if (name == input_line_pointer)
    30553051    {
    30563052      as_warn (_(".end directive has no name"));
     
    30893085  char *name;
    30903086  char name_end;
    3091   register int ch;
    30923087
    30933088  if (cur_file_ptr == (efdr_t *) NULL)
     
    31043099  name_end = get_symbol_end ();
    31053100
    3106   ch = *name;
    3107   if (! is_name_beginner (ch))
     3101  if (name == input_line_pointer)
    31083102    {
    31093103      as_warn (_(".ent directive has no name"));
     
    31273121      SKIP_WHITESPACE ();
    31283122    }
    3129   if (isdigit ((unsigned char) *input_line_pointer)
     3123  if (ISDIGIT (*input_line_pointer)
    31303124      || *input_line_pointer == '-')
    31313125    (void) get_absolute_expression ();
     
    31733167  if (cur_proc_ptr != (proc_t *) NULL)
    31743168    {
    3175       as_warn (_("No way to handle .file within .ent/.end section"));
     3169      as_warn (_("no way to handle .file within .ent/.end section"));
    31763170      demand_empty_rest_of_line ();
    31773171      return;
     
    32063200  if (get_absolute_expression_and_terminator (&val) != ',')
    32073201    {
    3208       as_warn (_("Bad .fmask directive"));
     3202      as_warn (_("bad .fmask directive"));
    32093203      --input_line_pointer;
    32103204      demand_empty_rest_of_line ();
     
    32403234      || get_absolute_expression_and_terminator (&val) != ',')
    32413235    {
    3242       as_warn (_("Bad .frame directive"));
     3236      as_warn (_("bad .frame directive"));
    32433237      --input_line_pointer;
    32443238      demand_empty_rest_of_line ();
     
    32783272  if (get_absolute_expression_and_terminator (&val) != ',')
    32793273    {
    3280       as_warn (_("Bad .mask directive"));
     3274      as_warn (_("bad .mask directive"));
    32813275      --input_line_pointer;
    32823276      demand_empty_rest_of_line ();
     
    34123406void
    34133407ecoff_directive_weakext (ignore)
    3414      int ignore;
     3408     int ignore ATTRIBUTE_UNUSED;
    34153409{
    34163410  char *name;
     
    34303424      if (S_IS_DEFINED (symbolP))
    34313425        {
    3432           as_bad (_("Ignoring attempt to redefine symbol `%s'."),
     3426          as_bad (_("symbol `%s' is already defined"),
    34333427                  S_GET_NAME (symbolP));
    34343428          ignore_rest_of_line ();
     
    35573551      if (dummy_symr.index != desc)
    35583552        {
    3559           as_warn (_("Line number (%d) for .stab%c directive cannot fit in index field (20 bits)"),
     3553          as_warn (_("line number (%d) for .stab%c directive cannot fit in index field (20 bits)"),
    35603554                   desc, what);
    35613555          return;
     
    35813575#endif
    35823576
    3583       if (isdigit ((unsigned char) *input_line_pointer)
     3577      if (ISDIGIT (*input_line_pointer)
    35843578          || *input_line_pointer == '-'
    35853579          || *input_line_pointer == '+')
     
    35933587      else if (! is_name_beginner ((unsigned char) *input_line_pointer))
    35943588        {
    3595           as_warn (_("Illegal .stab%c directive, bad character"), what);
     3589          as_warn (_("illegal .stab%c directive, bad character"), what);
    35963590          return;
    35973591        }
     
    36523646  if (S_IS_COMMON (sym)
    36533647      && S_GET_VALUE (sym) > 0
    3654       && S_GET_VALUE (sym) <= (unsigned) bfd_get_gp_size (stdoutput))
     3648      && S_GET_VALUE (sym) <= bfd_get_gp_size (stdoutput))
    36553649    {
    36563650      static asection scom_section;
     
    36773671    {
    36783672      if (S_IS_COMMON (sym))
    3679         as_bad (_("Symbol `%s' can not be both weak and common"),
     3673        as_bad (_("symbol `%s' can not be both weak and common"),
    36803674                S_GET_NAME (sym));
    36813675    }
     
    41184112                              s = symbol_get_obj (as_sym)->ecoff_extern_size;
    41194113                              if (s == 0
    4120                                   || s > (unsigned) bfd_get_gp_size (stdoutput))
     4114                                  || s > bfd_get_gp_size (stdoutput))
    41214115                                sc = sc_Undefined;
    41224116                              else
     
    41334127                              if (S_GET_VALUE (as_sym) > 0
    41344128                                  && (S_GET_VALUE (as_sym)
    4135                                       <= (unsigned) bfd_get_gp_size (stdoutput)))
     4129                                      <= bfd_get_gp_size (stdoutput)))
    41364130                                sc = sc_SCommon;
    41374131                              else
     
    47734767          if (! end_warning && ! cur_file_ptr->fake)
    47744768            {
    4775               as_warn (_("Missing .end or .bend at end of file"));
     4769              as_warn (_("missing .end or .bend at end of file"));
    47764770              end_warning = 1;
    47774771            }
Note: See TracChangeset for help on using the changeset viewer.