aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2002-09-18 08:02:22 +0000
committerThiemo Seufer <ths@networkno.de>2002-09-18 08:02:22 +0000
commit4cf0dd0d7ca7e6d1caba73e895989e7b6a5e3be8 (patch)
treeabf33801710f2c8daf95780590ff64067b5403f2 /gas
parent1f70368c21a866f7379c02da316ae0e2f355d610 (diff)
downloadgdb-4cf0dd0d7ca7e6d1caba73e895989e7b6a5e3be8.zip
gdb-4cf0dd0d7ca7e6d1caba73e895989e7b6a5e3be8.tar.gz
gdb-4cf0dd0d7ca7e6d1caba73e895989e7b6a5e3be8.tar.bz2
* config/tc-mips.c (s_change_section): Fix parsing. Code cleanup.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog4
-rw-r--r--gas/config/tc-mips.c14
2 files changed, 10 insertions, 8 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 5c789a6..7f8700b 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,7 @@
+2002-09-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (s_change_section): Fix parsing. Code cleanup.
+
2002-09-17 Stan Cox <scox@redhat.com>
* tc-mips.c (load_address): Use BFD_RELOC_MIPS_GOT_DISP for newabi.
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index c28f365..b75649c 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -11285,8 +11285,7 @@ s_change_section (ignore)
#ifdef OBJ_ELF
char *section_name;
char c;
- char *next_c;
- char *p;
+ char next_c;
int section_type;
int section_flag;
int section_entry_size;
@@ -11297,14 +11296,13 @@ s_change_section (ignore)
section_name = input_line_pointer;
c = get_symbol_end ();
- next_c = input_line_pointer + 1;
- /* just after name is now '\0' */
- p = input_line_pointer;
+ next_c = *(input_line_pointer + 1);
- /* Do we have .section Name<,"flags"> */
- if (c == '\n' || (c == ',' && *next_c == '"') || c == '"')
+ /* Do we have .section Name<,"flags">? */
+ if (c != ',' || (c == ',' && next_c == '"'))
{
- *p = c;
+ /* just after name is now '\0'. */
+ *input_line_pointer = c;
input_line_pointer = section_name;
obj_elf_section (ignore);
return;