summaryrefslogtreecommitdiff
path: root/gas/write.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2012-06-28 11:31:13 +0000
committerNick Clifton <nickc@redhat.com>2012-06-28 11:31:13 +0000
commit5330d3b4e456d2a09eda622db086940329993e7d (patch)
tree2a48d9026461d644383f9a4246b13d2bf3435391 /gas/write.c
parent3c96a61d7fd704cc6ae2627a617ca8889cc117e1 (diff)
downloadbinutils-redhat-5330d3b4e456d2a09eda622db086940329993e7d.tar.gz
* dwarf2dbg.c (DWARF2_USE_FIXED_ADVANCE_PC): Enable when using
linker relaxation. (dwarf2_gen_line_info): Generate real, local, labels for line numbers. (dwarf2dbg_convert_frag): Do not finalize the computation of the frag's symbol value when linker relaxation is enabled. (ADDR_DELTA_LIMIT): Define. (size_fixed_inc_line_addr): Use ADDR_DELTA_LIMIT. (emit_fixed_inc_line_addr): Likewise. * write.c (fixup_segment): If the subtraction of two symbols cannot be resolved but is valid, then prevent bogus range warnings by pre-biasing add_number. * config/tc-h8300.h (DWARF2_USE_FIXED_ADVANCE_PC): Define to 0. * gas/lns/lns.exp: Use alternate lns-common test for targets enabling linker relaxation. * gas/lns/lns-big-delta.d: Allow for output from architectures with 32-bit addresses.
Diffstat (limited to 'gas/write.c')
-rw-r--r--gas/write.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gas/write.c b/gas/write.c
index 23d4334289..7fb2e8bb3b 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