]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2010-02-08 Christophe Lyon <christophe.lyon@st.com>
authorChristophe Lyon <christophe.lyon@st.com>
Thu, 11 Feb 2010 15:10:32 +0000 (15:10 +0000)
committerChristophe Lyon <christophe.lyon@st.com>
Thu, 11 Feb 2010 15:10:32 +0000 (15:10 +0000)
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.

gas/ChangeLog
gas/config/tc-arm.c
gas/testsuite/ChangeLog

index c9cbd85e91ce7ffc546fe5af1b3c0ef89952a6fd..494778ab8bc0066a231806a09d7b9c8009126cf8 100644 (file)
@@ -1,3 +1,10 @@
+2010-02-08  Christophe Lyon  <christophe.lyon@st.com>
+
+       * 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  <r.sandiford@uk.ibm.com>
 
        * config/tc-ppc.c (md_show_usage): Add -mpwr4, -mpwr5, -mpwr5x,
index ead6e1356b805c97d30866342f4014fc9d1953cc..69b0f92756cf7b9ffc0ef7dc13fc5d63968b4713 100644 (file)
@@ -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;
index 22df83498f20cace99a90b6cbb136f07acd5c93e..39f9e59ef46fdc86c49a59be95256a20e7ea69c7 100644 (file)
@@ -1,3 +1,10 @@
+2010-02-08  Christophe Lyon  <christophe.lyon@st.com>
+
+       * 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  <christophe.lyon@st.com>
 
        * gas/arm/arm-it-auto.d, gas/arm/bl-local-v4t.d,