* config/tc-xtensa.c (get_aligned_diff): Handle target_size larger
authorBob Wilson <bob.wilson@acm.org>
Fri, 15 Apr 2005 04:15:02 +0000 (04:15 +0000)
committerBob Wilson <bob.wilson@acm.org>
Fri, 15 Apr 2005 04:15:02 +0000 (04:15 +0000)
        than the section alignment.

gas/ChangeLog
gas/config/tc-xtensa.c

index 3f03aa8..3a9e3db 100644 (file)
@@ -1,4 +1,9 @@
 2005-04-14  Bob Wilson  <bob.wilson@acm.org>
+
+       * config/tc-xtensa.c (get_aligned_diff): Handle target_size larger
+       than the section alignment.
+
+2005-04-14  Bob Wilson  <bob.wilson@acm.org>
            H.J. Lu  <hongjiu.lu@intel.com>
 
        * config/tc-xtensa.h (struct xtensa_frag_type): Add lit_frchain field.
index cf71aad..4e7524d 100644 (file)
@@ -8190,6 +8190,9 @@ get_aligned_diff (fragS *fragP, addressT address, offsetT *max_diff)
        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);