This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Make MIPS assembler support generic .set


Testing for mips-linux gives ERRORs for the assembly of ld-libs/lib-1.s 
and ld-libs/lib-2.s, because the assembler gives an unexpected "Warning: 
Tried to set unrecognized symbol: foo,0x2000".

The problem is that the MIPS assembler doesn't accept the ".set 
symbol,value" accepted by the generic assembler on most targets; it only 
understands a MIPS-specific .set.  This patch makes the MIPS assembler 
support the generic .set (so improving GNU assembler consistency between 
targets).  OK to commit?

2007-05-18  Joseph Myers  <joseph@codesourcery.com>

	* config/tc-mips.c (s_mipsset): Use generic s_set for directives
	containing a comma.

Index: gas/config/tc-mips.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mips.c,v
retrieving revision 1.367
diff -u -r1.367 tc-mips.c
--- gas/config/tc-mips.c	14 May 2007 12:28:45 -0000	1.367
+++ gas/config/tc-mips.c	18 May 2007 12:52:23 -0000
@@ -12614,6 +12614,14 @@
     mips_opts.sym32 = TRUE;
   else if (strcmp (name, "nosym32") == 0)
     mips_opts.sym32 = FALSE;
+  else if (strchr (name, ','))
+    {
+      /* Generic ".set" directive; use the generic handler.  */
+      *input_line_pointer = ch;
+      input_line_pointer = name;
+      s_set (0);
+      return;
+    }
   else
     {
       as_warn (_("Tried to set unrecognized symbol: %s\n"), name);

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]