This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Error Given for Missing Symbol Name
- To: binutils at sourceware dot cygnus dot com
- Subject: Error Given for Missing Symbol Name
- From: Tracy dot Kuhrt at microchip dot com
- Date: Thu, 26 Jul 2001 15:34:02 -0700
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.
Tracy
Index: gas/read.c
===================================================================
RCS file: /cvs/src/gas/read.c,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 read.c
--- gas/read.c 16 Apr 2001 20:14:37 -0000 1.1.1.2
+++ gas/read.c 26 Jul 2001 22:22:43 -0000
@@ -2743,6 +2743,14 @@ s_set (equiv)
input_line_pointer++;
*end_name = 0;
+ if (strlen(name) == 0)
+ {
+ as_bad (_("Expected symbol name. Ignoring directive."));
+ *end_name = delim;
+ discard_rest_of_line ();
+ return;
+ }
+
if (name[0] == '.' && name[1] == '\0')
{
/* Turn '. = mumble' into a .org mumble. */