small followup to recent Xtensa patch

Bob Wilson bwilson@tensilica.com
Fri Apr 15 04:18:00 GMT 2005


Fix a minor glitch in one of my recent changes: if the section alignment
is smaller than the size of a branch target instruction, the assembler
was failing.  Committed on the mainline and 2.16 branches.

2005-04-14  Bob Wilson  <bob.wilson@acm.org>
	    Sterling Augustine  <sterling@tensilica.com>

        * config/tc-xtensa.c (get_aligned_diff): Handle target_size
larger
        than the section alignment.
-------------- next part --------------
Index: tc-xtensa.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-xtensa.c,v
retrieving revision 1.32
diff -u -p -r1.32 tc-xtensa.c
--- tc-xtensa.c	14 Apr 2005 22:38:49 -0000	1.32
+++ tc-xtensa.c	15 Apr 2005 00:14:10 -0000
@@ -8190,6 +8190,9 @@ get_aligned_diff (fragS *fragP, addressT
 	target_size = 3;
       align_power = branch_align_power (now_seg);
       branch_align = 1 << align_power;
+      /* Don't count on the section alignment being as large as the target.  */
+      if (target_size > branch_align)
+	target_size = branch_align;
       opt_diff = get_text_align_fill_size (address, align_power,
 					   target_size, FALSE, FALSE);
 


More information about the Binutils mailing list