Changeset 609 for branches/GNU/src/binutils/gas/ecoff.c
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/gas/ecoff.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 1 /* 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 3 3 Free Software Foundation, Inc. 4 4 Contributed by Cygnus Support. … … 38 38 #include "aout/stab_gnu.h" 39 39 40 #include <ctype.h>40 #include "safe-ctype.h" 41 41 42 42 /* Why isn't this in coff/sym.h? */ … … 1561 1561 1562 1562 if (len >= PAGE_USIZE) 1563 as_fatal (_(" String too big (%lu bytes)"), len);1563 as_fatal (_("string too big (%lu bytes)"), len); 1564 1564 1565 1565 hash_ptr = (shash_t *) hash_find (hash_tbl, str); … … 1587 1587 err = hash_insert (hash_tbl, str, (char *) hash_ptr); 1588 1588 if (err) 1589 as_fatal (_(" Inserting \"%s\" into string hash table: %s"),1589 as_fatal (_("inserting \"%s\" into string hash table: %s"), 1590 1590 str, err); 1591 1591 } … … 2049 2049 char *perm; 2050 2050 2051 perm = xmalloc ((unsigned long) (strlen (tag) + 1)); 2052 strcpy (perm, tag); 2051 perm = xstrdup (tag); 2053 2052 hash_ptr = allocate_shash (); 2054 2053 err = hash_insert (tag_hash, perm, (char *) hash_ptr); 2055 2054 if (err) 2056 as_fatal (_(" Inserting \"%s\" into tag hash table: %s"),2055 as_fatal (_("inserting \"%s\" into tag hash table: %s"), 2057 2056 tag, err); 2058 2057 hash_ptr->string = perm; … … 2235 2234 debug_type = DEBUG_ECOFF; 2236 2235 } 2237 else 2236 else if (debug_type == DEBUG_UNSPECIFIED) 2238 2237 debug_type = DEBUG_NONE; 2239 2238 … … 2313 2312 2314 2313 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")); 2316 2315 2317 2316 /* Push the start of the filename. We assume that the filename … … 2558 2557 as_warn (_(".def pseudo-op used inside of .def/.endef; ignored")); 2559 2558 else if (*name == '\0') 2560 as_warn (_(" Empty symbol name in .def; ignored"));2559 as_warn (_("empty symbol name in .def; ignored")); 2561 2560 else 2562 2561 { … … 2565 2564 if (coff_tag != (char *) NULL) 2566 2565 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); 2569 2568 coff_type = type_info_init; 2570 2569 coff_storage_class = sc_Nil; … … 2611 2610 if (*input_line_pointer != '\n' 2612 2611 && *input_line_pointer != ';') 2613 as_warn (_(" Badly formed .dim directive"));2612 as_warn (_("badly formed .dim directive")); 2614 2613 break; 2615 2614 } … … 2624 2623 if (coff_type.num_dims >= N_TQ) 2625 2624 { 2626 as_warn (_(" Too many .dim entries"));2625 as_warn (_("too many .dim entries")); 2627 2626 break; 2628 2627 } … … 2686 2685 if (*input_line_pointer != '\n' 2687 2686 && *input_line_pointer != ';') 2688 as_warn (_(" Badly formed .size directive"));2687 as_warn (_("badly formed .size directive")); 2689 2688 break; 2690 2689 } … … 2699 2698 if (coff_type.num_sizes >= N_TQ) 2700 2699 { 2701 as_warn (_(" Too many .size entries"));2700 as_warn (_("too many .size entries")); 2702 2701 break; 2703 2702 } … … 2740 2739 There would still be a limit: the .type argument can not 2741 2740 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"), 2743 2742 coff_sym_name); 2744 2743 break; … … 2798 2797 name_end = get_symbol_end (); 2799 2798 2800 coff_tag = (char *) xmalloc ((unsigned long) (strlen (name) + 1)); 2801 strcpy (coff_tag, name); 2799 coff_tag = xstrdup (name); 2802 2800 2803 2801 *input_line_pointer = name_end; … … 2882 2880 if (coff_type.num_sizes != 1 || diff < 0) 2883 2881 { 2884 as_warn (_(" Bad COFF debugging info"));2882 as_warn (_("bad COFF debugging information")); 2885 2883 return; 2886 2884 } … … 2931 2929 if (coff_tag == (char *) NULL) 2932 2930 { 2933 as_warn (_(" No tag specified for %s"), name);2931 as_warn (_("no tag specified for %s"), name); 2934 2932 return; 2935 2933 } … … 2963 2961 != 1) 2964 2962 { 2965 as_warn (_(" Bad COFF debugging information"));2963 as_warn (_("bad COFF debugging information")); 2966 2964 return; 2967 2965 } … … 3031 3029 char *name; 3032 3030 char name_end; 3033 register int ch;3034 3031 symbolS *ent; 3035 3032 … … 3051 3048 name_end = get_symbol_end (); 3052 3049 3053 ch = *name; 3054 if (! is_name_beginner (ch)) 3050 if (name == input_line_pointer) 3055 3051 { 3056 3052 as_warn (_(".end directive has no name")); … … 3089 3085 char *name; 3090 3086 char name_end; 3091 register int ch;3092 3087 3093 3088 if (cur_file_ptr == (efdr_t *) NULL) … … 3104 3099 name_end = get_symbol_end (); 3105 3100 3106 ch = *name; 3107 if (! is_name_beginner (ch)) 3101 if (name == input_line_pointer) 3108 3102 { 3109 3103 as_warn (_(".ent directive has no name")); … … 3127 3121 SKIP_WHITESPACE (); 3128 3122 } 3129 if ( isdigit ((unsigned char)*input_line_pointer)3123 if (ISDIGIT (*input_line_pointer) 3130 3124 || *input_line_pointer == '-') 3131 3125 (void) get_absolute_expression (); … … 3173 3167 if (cur_proc_ptr != (proc_t *) NULL) 3174 3168 { 3175 as_warn (_(" No way to handle .file within .ent/.end section"));3169 as_warn (_("no way to handle .file within .ent/.end section")); 3176 3170 demand_empty_rest_of_line (); 3177 3171 return; … … 3206 3200 if (get_absolute_expression_and_terminator (&val) != ',') 3207 3201 { 3208 as_warn (_(" Bad .fmask directive"));3202 as_warn (_("bad .fmask directive")); 3209 3203 --input_line_pointer; 3210 3204 demand_empty_rest_of_line (); … … 3240 3234 || get_absolute_expression_and_terminator (&val) != ',') 3241 3235 { 3242 as_warn (_(" Bad .frame directive"));3236 as_warn (_("bad .frame directive")); 3243 3237 --input_line_pointer; 3244 3238 demand_empty_rest_of_line (); … … 3278 3272 if (get_absolute_expression_and_terminator (&val) != ',') 3279 3273 { 3280 as_warn (_(" Bad .mask directive"));3274 as_warn (_("bad .mask directive")); 3281 3275 --input_line_pointer; 3282 3276 demand_empty_rest_of_line (); … … 3412 3406 void 3413 3407 ecoff_directive_weakext (ignore) 3414 int ignore ;3408 int ignore ATTRIBUTE_UNUSED; 3415 3409 { 3416 3410 char *name; … … 3430 3424 if (S_IS_DEFINED (symbolP)) 3431 3425 { 3432 as_bad (_(" Ignoring attempt to redefine symbol `%s'."),3426 as_bad (_("symbol `%s' is already defined"), 3433 3427 S_GET_NAME (symbolP)); 3434 3428 ignore_rest_of_line (); … … 3557 3551 if (dummy_symr.index != desc) 3558 3552 { 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)"), 3560 3554 desc, what); 3561 3555 return; … … 3581 3575 #endif 3582 3576 3583 if ( isdigit ((unsigned char)*input_line_pointer)3577 if (ISDIGIT (*input_line_pointer) 3584 3578 || *input_line_pointer == '-' 3585 3579 || *input_line_pointer == '+') … … 3593 3587 else if (! is_name_beginner ((unsigned char) *input_line_pointer)) 3594 3588 { 3595 as_warn (_(" Illegal .stab%c directive, bad character"), what);3589 as_warn (_("illegal .stab%c directive, bad character"), what); 3596 3590 return; 3597 3591 } … … 3652 3646 if (S_IS_COMMON (sym) 3653 3647 && 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)) 3655 3649 { 3656 3650 static asection scom_section; … … 3677 3671 { 3678 3672 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"), 3680 3674 S_GET_NAME (sym)); 3681 3675 } … … 4118 4112 s = symbol_get_obj (as_sym)->ecoff_extern_size; 4119 4113 if (s == 0 4120 || s > (unsigned)bfd_get_gp_size (stdoutput))4114 || s > bfd_get_gp_size (stdoutput)) 4121 4115 sc = sc_Undefined; 4122 4116 else … … 4133 4127 if (S_GET_VALUE (as_sym) > 0 4134 4128 && (S_GET_VALUE (as_sym) 4135 <= (unsigned)bfd_get_gp_size (stdoutput)))4129 <= bfd_get_gp_size (stdoutput))) 4136 4130 sc = sc_SCommon; 4137 4131 else … … 4773 4767 if (! end_warning && ! cur_file_ptr->fake) 4774 4768 { 4775 as_warn (_(" Missing .end or .bend at end of file"));4769 as_warn (_("missing .end or .bend at end of file")); 4776 4770 end_warning = 1; 4777 4771 } -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.