Commit: RX: Fix assembler's handling of section alignment parameter

Nick Clifton nickc@redhat.com
Mon Nov 2 13:49:00 GMT 2015


Hi Guys,

  The RX assembler supports a section alignment parameter to the
  .section pseudo-op, but it was mistakenly treating it as a power-of-N
  value instead of a multiple-of-N value.  This patch fixes that.

Cheers
  Nick

gas/ChangeLog
2015-11-02  Nick Clifton  <nickc@redhat.com>

	* config/tc-rx.c (parse_rx_section): Align parameter provides a
	multiple of n argument, not a power of n argument.

Index: gas/config/tc-rx.c
===================================================================
RCS file: /cvs/cvsfiles/gnupro/gas/config/tc-rx.c,v
retrieving revision 1.15.6.1
diff -u -3 -p -r1.15.6.1 tc-rx.c
--- gas/config/tc-rx.c	17 Mar 2015 14:54:34 -0000	1.15.6.1
+++ gas/config/tc-rx.c	14 Sep 2015 12:35:11 -0000
@@ -401,7 +417,7 @@ parse_rx_section (char * name)
   asection * sec;
   int   type;
   int   attr = SHF_ALLOC | SHF_EXECINSTR;
-  int   align = 2;
+  int   align = 1;
   char  end_char;
 
   do
@@ -429,9 +445,9 @@ parse_rx_section (char * name)
 		p++;
 	      switch (*p)
 		{
-		case '2': align = 2; break;
-		case '4': align = 4; break;
-		case '8': align = 8; break;
+		case '2': align = 1; break;
+		case '4': align = 2; break;
+		case '8': align = 3; break;
 		default:
 		  as_bad (_("unrecognised alignment value in .SECTION directive: %s"), p);
 		  ignore_rest_of_line ();



More information about the Binutils mailing list