s_change_section (int ignore ATTRIBUTE_UNUSED)
{
char *saved_ilp;
- char *section_name;
- char c, endc;
- char next_c = 0;
+ const char *section_name;
+ char c, next_c = 0;
int section_type;
int section_flag;
int section_entry_size;
int section_alignment;
saved_ilp = input_line_pointer;
- endc = get_symbol_name (§ion_name);
- c = (endc == '"' ? input_line_pointer[1] : endc);
+ section_name = obj_elf_section_name ();
+ if (section_name == NULL)
+ return;
+ c = input_line_pointer[0];
if (c)
- next_c = input_line_pointer [(endc == '"' ? 2 : 1)];
+ next_c = input_line_pointer[1];
/* Do we have .section Name<,"flags">? */
if (c != ',' || (c == ',' && next_c == '"'))
{
- /* Just after name is now '\0'. */
- (void) restore_line_pointer (endc);
input_line_pointer = saved_ilp;
obj_elf_section (ignore);
return;
}
- section_name = xstrdup (section_name);
- c = restore_line_pointer (endc);
-
input_line_pointer++;
/* Do we have .section Name<,type><,flag><,entry_size><,alignment> */
obj_elf_change_section (section_name, section_type, section_flag,
section_entry_size, 0, 0, 0);
-
- if (now_seg->name != section_name)
- free (section_name);
}
void