+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.
bfd_section_name (stdoutput, sec),
bfd_errmsg (bfd_get_error ()));
}
+
+ demand_empty_rest_of_line ();
}
void
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;
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
}
}
- 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 ();
}