diff options
Diffstat (limited to 'gas/write.c')
-rw-r--r-- | gas/write.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gas/write.c b/gas/write.c index 23d4334..7fb2e8b 100644 --- a/gas/write.c +++ b/gas/write.c @@ -1004,7 +1004,12 @@ fixup_segment (fixS *fixP, segT this_segment) fixP->fx_subsy = NULL; fixP->fx_pcrel = 1; } - else if (!TC_VALIDATE_FIX_SUB (fixP, add_symbol_segment)) + else if (TC_VALIDATE_FIX_SUB (fixP, add_symbol_segment)) + /* If the fix is valid, subtract fx_subsy here. The addition of + fx_addsy will be performed below. Doing this prevents bogus + warnings from the range check below. */ + add_number -= S_GET_VALUE (fixP->fx_subsy); + else { if (!md_register_arithmetic && (add_symbol_segment == reg_section |