From: Christophe Lyon Date: Thu, 11 Feb 2010 15:10:32 +0000 (+0000) Subject: 2010-02-08 Christophe Lyon X-Git-Tag: binutils-2_20_1~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3f72c328fe1c985589fcd5f27967ff8dacb28c37;p=thirdparty%2Fbinutils-gdb.git 2010-02-08 Christophe Lyon gas/ * config/tc-arm.c (md_pcrel_from_section): Keep base to zero for non-local branches (BFD_RELOC_THUMB_PCREL_BRANCH23, BFD_RELOC_THUMB_PCREL_BLX, BFD_RELOC_ARM_PCREL_BLX, BFD_RELOC_ARM_PCREL_CALL) gas/testsuite/ * gas/arm/branch-reloc.s, gas/arm/branch-reloc.d, gas/arm/branch-reloc.l: New tests and expected results with all variants of call: ARM/Thumb, local/global, inter/intra-section, using BL/BLX. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index c9cbd85e91c..494778ab8bc 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2010-02-08 Christophe Lyon + + * config/tc-arm.c (md_pcrel_from_section): Keep base to zero for + non-local branches (BFD_RELOC_THUMB_PCREL_BRANCH23, + BFD_RELOC_THUMB_PCREL_BLX, BFD_RELOC_ARM_PCREL_BLX, + BFD_RELOC_ARM_PCREL_CALL) + 2010-02-10 Richard Sandiford * config/tc-ppc.c (md_show_usage): Add -mpwr4, -mpwr5, -mpwr5x, diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index ead6e1356b8..69b0f92756c 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -19041,6 +19041,8 @@ md_pcrel_from_section (fixS * fixP, segT seg) case BFD_RELOC_THUMB_PCREL_BRANCH23: if (fixP->fx_addsy + && (S_GET_SEGMENT (fixP->fx_addsy) == seg) + && (!S_IS_EXTERNAL (fixP->fx_addsy)) && ARM_IS_FUNC (fixP->fx_addsy) && ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v5t)) base = fixP->fx_where + fixP->fx_frag->fr_address; @@ -19050,6 +19052,8 @@ md_pcrel_from_section (fixS * fixP, segT seg) zero. */ case BFD_RELOC_THUMB_PCREL_BLX: if (fixP->fx_addsy + && (S_GET_SEGMENT (fixP->fx_addsy) == seg) + && (!S_IS_EXTERNAL (fixP->fx_addsy)) && THUMB_IS_FUNC (fixP->fx_addsy) && ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v5t)) base = fixP->fx_where + fixP->fx_frag->fr_address; @@ -19059,6 +19063,8 @@ md_pcrel_from_section (fixS * fixP, segT seg) loader expects the relocation not to take this into account. */ case BFD_RELOC_ARM_PCREL_BLX: if (fixP->fx_addsy + && (S_GET_SEGMENT (fixP->fx_addsy) == seg) + && (!S_IS_EXTERNAL (fixP->fx_addsy)) && ARM_IS_FUNC (fixP->fx_addsy) && ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v5t)) base = fixP->fx_where + fixP->fx_frag->fr_address; @@ -19066,6 +19072,8 @@ md_pcrel_from_section (fixS * fixP, segT seg) case BFD_RELOC_ARM_PCREL_CALL: if (fixP->fx_addsy + && (S_GET_SEGMENT (fixP->fx_addsy) == seg) + && (!S_IS_EXTERNAL (fixP->fx_addsy)) && THUMB_IS_FUNC (fixP->fx_addsy) && ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v5t)) base = fixP->fx_where + fixP->fx_frag->fr_address; diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 22df83498f2..39f9e59ef46 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2010-02-08 Christophe Lyon + + * gas/arm/branch-reloc.s, gas/arm/branch-reloc.d, + gas/arm/branch-reloc.l: New tests and expected results with all + variants of call: ARM/Thumb, local/global, inter/intra-section, + using BL/BLX. + 2010-02-05 Christophe Lyon * gas/arm/arm-it-auto.d, gas/arm/bl-local-v4t.d,