From: Thiemo Seufer Date: Sat, 30 Jul 2005 13:53:13 +0000 (+0000) Subject: * config/tc-mips.c (s_mips_globl): Allow multiple symbols per .globl. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8a06b76942677bbb694e816118550dfa2ee4351e;p=binutils-gdb.git * config/tc-mips.c (s_mips_globl): Allow multiple symbols per .globl. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 1d7eb05d7b3..5eeb6842977 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2005-07-29 Thiemo Seufer + + * config/tc-mips.c (s_mips_globl): Allow multiple symbols per .globl. + 2005-07-29 Paul Brook * config/tc-arm.c (T16_32_TAB): Add "addr". Fix encoding of push and diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 9dd9f12744b..236c4061613 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -11407,35 +11407,50 @@ s_mips_globl (int x ATTRIBUTE_UNUSED) symbolS *symbolP; flagword flag; - name = input_line_pointer; - c = get_symbol_end (); - symbolP = symbol_find_or_make (name); - *input_line_pointer = c; - SKIP_WHITESPACE (); - - /* On Irix 5, every global symbol that is not explicitly labelled as - being a function is apparently labelled as being an object. */ - flag = BSF_OBJECT; - - if (! is_end_of_line[(unsigned char) *input_line_pointer]) + do { - char *secname; - asection *sec; - - secname = input_line_pointer; + name = input_line_pointer; c = get_symbol_end (); - sec = bfd_get_section_by_name (stdoutput, secname); - if (sec == NULL) - as_bad (_("%s: no such section"), secname); + symbolP = symbol_find_or_make (name); + S_SET_EXTERNAL (symbolP); + *input_line_pointer = c; + SKIP_WHITESPACE (); - if (sec != NULL && (sec->flags & SEC_CODE) != 0) - flag = BSF_FUNCTION; - } + /* On Irix 5, every global symbol that is not explicitly labelled as + being a function is apparently labelled as being an object. */ + flag = BSF_OBJECT; + + if (!is_end_of_line[(unsigned char) *input_line_pointer] + && (*input_line_pointer != ',')) + { + char *secname; + asection *sec; + + secname = input_line_pointer; + c = get_symbol_end (); + sec = bfd_get_section_by_name (stdoutput, secname); + if (sec == NULL) + as_bad (_("%s: no such section"), secname); + *input_line_pointer = c; + + if (sec != NULL && (sec->flags & SEC_CODE) != 0) + flag = BSF_FUNCTION; + } + + symbol_get_bfdsym (symbolP)->flags |= flag; - symbol_get_bfdsym (symbolP)->flags |= flag; + c = *input_line_pointer; + if (c == ',') + { + input_line_pointer++; + SKIP_WHITESPACE (); + if (is_end_of_line[(unsigned char) *input_line_pointer]) + c = '\n'; + } + } + while (c == ','); - S_SET_EXTERNAL (symbolP); demand_empty_rest_of_line (); }