diff options
author | Thiemo Seufer <ths@networkno.de> | 2005-07-30 13:53:13 +0000 |
---|---|---|
committer | Thiemo Seufer <ths@networkno.de> | 2005-07-30 13:53:13 +0000 |
commit | 8a06b76942677bbb694e816118550dfa2ee4351e (patch) | |
tree | c0f2f21bb54c33b3ebb2d17a70ebbc8337bd8be0 | |
parent | dbfb74ddb5d16ad43a0bca8b4b51e99207f8a47e (diff) | |
download | gdb-8a06b76942677bbb694e816118550dfa2ee4351e.zip gdb-8a06b76942677bbb694e816118550dfa2ee4351e.tar.gz gdb-8a06b76942677bbb694e816118550dfa2ee4351e.tar.bz2 |
* config/tc-mips.c (s_mips_globl): Allow multiple symbols per .globl.
-rw-r--r-- | gas/ChangeLog | 4 | ||||
-rw-r--r-- | gas/config/tc-mips.c | 61 |
2 files changed, 42 insertions, 23 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 1d7eb05..5eeb684 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2005-07-29 Thiemo Seufer <ths@networkno.de> + + * config/tc-mips.c (s_mips_globl): Allow multiple symbols per .globl. + 2005-07-29 Paul Brook <paul@codesourcery.com> * 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 9dd9f12..236c406 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 (); } |