diff options
author | Alan Modra <amodra@gmail.com> | 2007-08-24 04:18:37 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2007-08-24 04:18:37 +0000 |
commit | 67c11a9b99d56d3b86f9d337dad56973227116b9 (patch) | |
tree | a1ce8b1668d8381af21ea73212ad73a1b1c2658b /gas | |
parent | c3d65c1ced61cfb87d77e677ee576a3353ce5e34 (diff) | |
download | gdb-67c11a9b99d56d3b86f9d337dad56973227116b9.zip gdb-67c11a9b99d56d3b86f9d337dad56973227116b9.tar.gz gdb-67c11a9b99d56d3b86f9d337dad56973227116b9.tar.bz2 |
* config/tc-i386.c (lex_got): Don't scan past a comma.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 12 |
2 files changed, 11 insertions, 6 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index a9d2491..cb2460c 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2007-08-24 Anders Waldenborg <anders@0x63.nu> + Alan Modra <amodra@bigpond.net.au> + + * config/tc-i386.c (lex_got): Don't scan past a comma. + 2007-08-23 Ben Elliston <bje@au.ibm.com> * config/tc-ppc.c (parse_cpu): Handle "750cl". diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 0ef4142..16376dc 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -4485,7 +4485,7 @@ lex_got (enum bfd_reloc_code_real *reloc, return NULL; for (cp = input_line_pointer; *cp != '@'; cp++) - if (is_end_of_line[(unsigned char) *cp]) + if (is_end_of_line[(unsigned char) *cp] || *cp == ',') return NULL; for (j = 0; j < sizeof (gotrel) / sizeof (gotrel[0]); j++) @@ -4519,12 +4519,12 @@ lex_got (enum bfd_reloc_code_real *reloc, first = cp - input_line_pointer; /* The second part goes from after the reloc token until - (and including) an end_of_line char. Don't use strlen - here as the end_of_line char may not be a NUL. */ + (and including) an end_of_line char or comma. */ past_reloc = cp + 1 + len; - for (cp = past_reloc; !is_end_of_line[(unsigned char) *cp++]; ) - ; - second = cp - past_reloc; + cp = past_reloc; + while (!is_end_of_line[(unsigned char) *cp] && *cp != ',') + ++cp; + second = cp + 1 - past_reloc; /* Allocate and copy string. The trailing NUL shouldn't be necessary, but be safe. */ |