From: Ian Lance Taylor Date: Wed, 17 Nov 1993 23:03:42 +0000 (+0000) Subject: * read.c (read_a_source_file): If we find a bad pseudo-op, X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=46b8119005ca3b3a9346c0be45dcc6f68ce1ce01;p=binutils-gdb.git * read.c (read_a_source_file): If we find a bad pseudo-op, do a continue to go on to the next line rather than a break. Removed duplicate bad pseudo-op code which was never executed. * read.c (s_lcomm): Do not require a comma after the name. * read.c (s_lcomm): Set bss flag for .sbss section if used. --- diff --git a/gas/read.c b/gas/read.c index f9979dec602..1e41a4e1f74 100644 --- a/gas/read.c +++ b/gas/read.c @@ -497,7 +497,7 @@ read_a_source_file (name) as_bad ("Unknown pseudo-op: `%s'", s); *input_line_pointer = c; s_ignore (0); - break; + continue; } /* Put it back for error messages etc. */ @@ -512,13 +512,7 @@ read_a_source_file (name) * Input_line_pointer->1st non-blank char * after pseudo-operation. */ - if (!pop) - { - ignore_rest_of_line (); - break; - } - else - (*pop->poc_handler) (pop->poc_val); + (*pop->poc_handler) (pop->poc_val); } else #endif @@ -1059,15 +1053,15 @@ s_lcomm (needs_align) p = input_line_pointer; *p = c; SKIP_WHITESPACE (); - if (*input_line_pointer != ',') + + /* Accept an optional comma after the name. The comma used to be + required, but Irix 5 cc does not generate it. */ + if (*input_line_pointer == ',') { - as_bad ("Expected comma after name"); - ignore_rest_of_line (); - return; + ++input_line_pointer; + SKIP_WHITESPACE (); } - ++input_line_pointer; - if (*input_line_pointer == '\n') { as_bad ("Missing size expression"); @@ -1085,7 +1079,10 @@ s_lcomm (needs_align) #if defined (OBJ_ECOFF) || defined (OBJ_ELF) /* For MIPS ECOFF or ELF, small objects are put in .sbss. */ if (temp <= bfd_get_gp_size (stdoutput)) - bss_seg = subseg_new (".sbss", 1); + { + bss_seg = subseg_new (".sbss", 1); + seg_info (bss_seg)->bss = 1; + } #endif #endif @@ -2915,10 +2912,11 @@ s_xstab (what) /* To get the name of the stab string section, simply .str to the stab section name. */ - stabstr_secname = alloca (strlen (stab_secname) + 4); + stabstr_secname = (char *) xmalloc (strlen (stab_secname) + 4); strcpy (stabstr_secname, stab_secname); strcat (stabstr_secname, "str"); s_stab_generic (what, stab_secname, stabstr_secname); + free (stabstr_secname); } #ifdef S_SET_DESC