From 0e5cd789e193c6fc0ca95cc5ec270b489f814ed5 Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Fri, 15 Apr 2005 04:15:02 +0000 Subject: [PATCH] * config/tc-xtensa.c (get_aligned_diff): Handle target_size larger than the section alignment. --- gas/ChangeLog | 5 +++++ gas/config/tc-xtensa.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/gas/ChangeLog b/gas/ChangeLog index 3f03aa82b45..3a9e3dbe726 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2005-04-14 Bob Wilson + + * 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); -- 2.30.2