diff options
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/config/obj-coff.c | 34 |
2 files changed, 21 insertions, 20 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index f195b43..3c114f5 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +Wed Apr 24 11:28:38 1996 Ian Lance Taylor <ian@cygnus.com> + + * config/obj-coff.c (obj_coff_section): BFD_ASSEMBLER version: + call demand_empty_rest_of_line. Non BFD_ASSEMBLER version: + correct handling of input line pointer, and call + demand_empty_rest_of_line. + Mon Apr 22 18:02:37 1996 Doug Evans <dje@blues.cygnus.com> * config/tc-sparc.c (in_bitfield_range): New static function. diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c index 9ad0f6b..087e250 100644 --- a/gas/config/obj-coff.c +++ b/gas/config/obj-coff.c @@ -1239,6 +1239,8 @@ obj_coff_section (ignore) bfd_section_name (stdoutput, sec), bfd_errmsg (bfd_get_error ())); } + + demand_empty_rest_of_line (); } void @@ -3285,11 +3287,8 @@ obj_coff_section (ignore) int ignore; { /* Strip out the section name */ - char *section_name; - char *section_name_end; + char *section_name, *name; char c; - int argp; - unsigned int len; unsigned int exp; long flags; @@ -3310,26 +3309,21 @@ obj_coff_section (ignore) section_name = input_line_pointer; c = get_symbol_end (); - section_name_end = input_line_pointer; - len = section_name_end - section_name; - input_line_pointer++; - SKIP_WHITESPACE (); + name = xmalloc (input_line_pointer - section_name + 1); + strcpy (name, section_name); - argp = 0; - if (c == ',') - argp = 1; - else if (*input_line_pointer == ',') - { - argp = 1; - ++input_line_pointer; - SKIP_WHITESPACE (); - } + *input_line_pointer = c; exp = 0; flags = 0; - if (argp) + + SKIP_WHITESPACE (); + if (*input_line_pointer == ',') { + ++input_line_pointer; + SKIP_WHITESPACE (); + if (*input_line_pointer != '"') exp = get_absolute_expression (); else @@ -3360,11 +3354,11 @@ obj_coff_section (ignore) } } - subseg_new (section_name, (subsegT) exp); + subseg_new (name, (subsegT) exp); segment_info[now_seg].scnhdr.s_flags |= flags; - *section_name_end = c; + demand_empty_rest_of_line (); } |