bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

address@hidden: Bug#247346: Patch for the bug]


From: Hakan Ardo
Subject: address@hidden: Bug#247346: Patch for the bug]
Date: Sun, 26 Dec 2004 12:38:32 +0100
User-agent: Mutt/1.3.28i

Hi,
this applies to binutils 2.15.

----- Forwarded message from Tom Parker <address@hidden> -----

Subject: Bug#247346: Patch for the bug
From: Tom Parker <address@hidden>
To: address@hidden

The attached patch (when dropped into a debian/patches folder for 
binutils-avr) provides a new flag to avr-as "--allow-dollars", which 
overrides the default settings to always allow dollars in function 
names. Behaviour without this flag is unchanged from standard avr-as.

For nesC/TinyOS users, the addition of "OPTFLAGS:= -Wa,--allow-dollars" 
to their makefiles will enable this (with nesC >=1.1.3) , and this 
should possibly be mentioned somewhere in the README.Debian or an FAQ or 
something, as there's going to be a fair few people wanting to know how 
to fix this one.

Tom Parker
-- 
address@hidden - http://tevp.net
Illegitimus non carborundum

diff -ruN binutils-2.15-old/gas/as.c binutils-2.15/gas/as.c
--- binutils-2.15-old/gas/as.c  2003-10-27 13:45:17.000000000 +0100
+++ binutils-2.15/gas/as.c      2004-12-13 16:12:41.000000000 +0100
@@ -338,6 +338,8 @@
   fprintf (stream, _("\
   --listing-cont-lines    set the maximum number of continuation lines used\n\
                           for the output data column of the listing\n"));
+  fprintf (stream, _("\
+  --allow-dollars         always allow dollars in function names\n"));
 
   md_show_usage (stream);
 
@@ -414,7 +416,8 @@
       OPTION_TARGET_HELP,
       OPTION_EXECSTACK,
       OPTION_NOEXECSTACK,
-      OPTION_WARN_FATAL
+      OPTION_WARN_FATAL,
+      OPTION_ALLOW_DOLLARS
     };
   
   static const struct option std_longopts[] =
@@ -457,7 +460,8 @@
     {"execstack", no_argument, NULL, OPTION_EXECSTACK},
     {"noexecstack", no_argument, NULL, OPTION_NOEXECSTACK},
 #endif
-    {"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL}
+    {"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL},
+    {"allow-dollars", no_argument, NULL, OPTION_ALLOW_DOLLARS}
     /* When you add options here, check that they do not collide with
        OPTION_MD_BASE.  See as.h.  */
   };
@@ -715,6 +719,10 @@
          flag_no_warnings = 0;
          flag_fatal_warnings = 1;
          break;
+       
+       case OPTION_ALLOW_DOLLARS:
+         flag_allow_dollars = 1;
+         break;
 
 #if defined BFD_ASSEMBLER && (defined OBJ_ELF || defined OBJ_MAYBE_ELF)
        case OPTION_EXECSTACK:
diff -ruN binutils-2.15-old/gas/as.h binutils-2.15/gas/as.h
--- binutils-2.15-old/gas/as.h  2003-11-23 03:14:21.000000000 +0100
+++ binutils-2.15/gas/as.h      2004-12-13 16:08:47.000000000 +0100
@@ -413,6 +413,9 @@
 /* True if we are assembling in MRI mode.  */
 COMMON int flag_mri;
 
+/* True if dollars should always be allowed in function names */
+COMMON int flag_allow_dollars;
+
 /* Should the data section be made read-only and appended to the text
    section?  */
 COMMON unsigned char flag_readonly_data_in_text; /* -R */
diff -ruN binutils-2.15-old/gas/read.c binutils-2.15/gas/read.c
--- binutils-2.15-old/gas/read.c        2004-05-17 21:36:08.000000000 +0200
+++ binutils-2.15/gas/read.c    2004-12-13 16:11:58.000000000 +0100
@@ -242,6 +242,12 @@
 
   if (flag_mri)
     lex_type['?'] = 3;
+ 
+  if (flag_allow_dollars) /* always allow dollars */
+  {
+    lex_type['$'] = 3;
+    is_end_of_line['$'] = 0;
+  }
 }
 
 /* Set up pseudo-op tables.  */


----- End forwarded message -----

-- 
Hakan Ardo <address@hidden>, http://master.debian.org/~hakan/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]