This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Error Given for Missing Symbol Name
- To: Tracy dot Kuhrt at microchip dot com
- Subject: Re: Error Given for Missing Symbol Name
- From: Alan Modra <amodra at bigpond dot net dot au>
- Date: Fri, 27 Jul 2001 18:06:47 +0930
- Cc: binutils at sourceware dot cygnus dot com
- References: <OFA95FE4D9.AC6FC87E-ON07256A95.007B6ED9@microchip.com>
On Thu, Jul 26, 2001 at 03:34:02PM -0700, Tracy.Kuhrt@microchip.com wrote:
> I would like to suggest the following patch so that an error is given to
> the user if they do not specify the symbol name in the .equ, .equiv, or
> .set directives.
Thanks. I've applied a slightly different patch. Next time, please send
a ChangeLog entry too.
gas/ChangeLog
* read.c (s_set): Check for missing symbol name.
--
Alan Modra
Index: gas/read.c
===================================================================
RCS file: /cvs/src/src/gas/read.c,v
retrieving revision 1.43
diff -u -p -r1.43 read.c
--- read.c 2001/07/10 09:45:50 1.43
+++ read.c 2001/07/27 08:29:36
@@ -2737,6 +2737,15 @@ s_set (equiv)
name = input_line_pointer;
delim = get_symbol_end ();
end_name = input_line_pointer;
+
+ if (name[0] == '\0')
+ {
+ as_bad (_("expected symbol name"));
+ *end_name = delim;
+ discard_rest_of_line ();
+ return;
+ }
+
*end_name = delim;
SKIP_WHITESPACE ();