From: Bob Wilson Date: Fri, 15 Apr 2005 04:24:48 +0000 (+0000) Subject: * config/tc-xtensa.c (get_aligned_diff): Handle target_size larger X-Git-Tag: binutils-2_16~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8091a55832a1e962a5d0e7def3638da373736666;p=thirdparty%2Fbinutils-gdb.git * config/tc-xtensa.c (get_aligned_diff): Handle target_size larger than the section alignment. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 4818be70248..2cd85fc810e 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2005-04-14 Bob Wilson + Sterling Augustine + + * config/tc-xtensa.c (get_aligned_diff): Handle target_size larger + than the section alignment. + 2005-04-14 Bob Wilson H.J. Lu diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c index cf71aad1b30..4e7524dc588 100644 --- a/gas/config/tc-xtensa.c +++ b/gas/config/tc-xtensa.c @@ -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);