aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2005-04-09 06:21:19 +0000
committerAlan Modra <amodra@gmail.com>2005-04-09 06:21:19 +0000
commit31d20a21672ff182075060e87fc54ea5c5025bb3 (patch)
tree28d1cd9c9e76d265a173a86b3e8fb2c08bdfe484 /gas
parentbe95a9c15d32e35e7529c6a4e035e60398184b99 (diff)
downloadgdb-31d20a21672ff182075060e87fc54ea5c5025bb3.zip
gdb-31d20a21672ff182075060e87fc54ea5c5025bb3.tar.gz
gdb-31d20a21672ff182075060e87fc54ea5c5025bb3.tar.bz2
* read.c (assign_symbol): Remove const from parm. Fix xcalloc
call. Don't do the COFF hacks for multi-emulation gas. Move demand_empty_rest_of_line back to caller. (s_set, equals): demand_empty_rest_of_line here.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/read.c22
2 files changed, 16 insertions, 11 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index ba7b8d5..fdac073 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,10 @@
2005-04-09 Alan Modra <amodra@bigpond.net.au>
+ * read.c (assign_symbol): Remove const from parm. Fix xcalloc
+ call. Don't do the COFF hacks for multi-emulation gas. Move
+ demand_empty_rest_of_line back to caller.
+ (s_set, equals): demand_empty_rest_of_line here.
+
PR gas/827
* as.h (rs_dummy): Define.
* symbols.c (symbol_X_add_number): New function.
diff --git a/gas/read.c b/gas/read.c
index 414d3ab..a606d03 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -2748,7 +2748,7 @@ end_repeat (int extra)
}
static void
-assign_symbol (const char *name, int no_reassign)
+assign_symbol (char *name, int no_reassign)
{
symbolS *symbolP;
@@ -2777,18 +2777,15 @@ assign_symbol (const char *name, int no_reassign)
if (listing & LISTING_SYMBOLS)
{
extern struct list_info_struct *listing_tail;
- fragS *dummy_frag = (fragS *) xcalloc (sizeof (fragS));
+ fragS *dummy_frag = (fragS *) xcalloc (1, sizeof (fragS));
dummy_frag->line = listing_tail;
dummy_frag->fr_symbol = symbolP;
symbol_set_frag (symbolP, dummy_frag);
}
#endif
-#if defined (OBJ_COFF) || defined (OBJ_MAYBE_COFF)
-#if defined (BFD_ASSEMBLER) && defined (OBJ_MAYBE_COFF)
- if (OUTPUT_FLAVOR == bfd_target_coff_flavour)
-#endif
- /* "set" symbols are local unless otherwise specified. */
- SF_SET_LOCAL (symbolP);
+#ifdef OBJ_COFF
+ /* "set" symbols are local unless otherwise specified. */
+ SF_SET_LOCAL (symbolP);
#endif
}
@@ -2799,8 +2796,6 @@ assign_symbol (const char *name, int no_reassign)
as_bad (_("symbol `%s' is already defined"), name);
pseudo_set (symbolP);
-
- demand_empty_rest_of_line ();
}
/* Handle the .equ, .equiv and .set directives. If EQUIV is 1, then
@@ -2845,6 +2840,8 @@ s_set (int equiv)
assign_symbol (name, equiv);
*end_name = delim;
+
+ demand_empty_rest_of_line ();
}
void
@@ -4923,7 +4920,10 @@ equals (char *sym_name, int reassign)
assign_symbol (sym_name, !reassign);
if (flag_mri)
- mri_comment_end (stop, stopc);
+ {
+ demand_empty_rest_of_line ();
+ mri_comment_end (stop, stopc);
+ }
}
/* .incbin -- include a file verbatim at the current location. */