* config/tc-arm.c (do_t_blx): Always use BFD_RELOC_THUMB_PCREL_BLX.
	(md_pcrel_from_section): Align address for BLX.
	(tc_gen_reloc): Change BFD_RELOC_THUMB_PCREL_BLX relocations to
	BFD_RELOC_THUMB_PCREL_BRANCH23 for EABI v4+.
This commit is contained in:
Julian Brown 2009-05-01 13:50:10 +00:00
parent 49dff77b6e
commit 00adf2d469
2 changed files with 22 additions and 8 deletions

View File

@ -1,3 +1,10 @@
2009-05-01 Julian Brown <julian@codesourcery.com>
* config/tc-arm.c (do_t_blx): Always use BFD_RELOC_THUMB_PCREL_BLX.
(md_pcrel_from_section): Align address for BLX.
(tc_gen_reloc): Change BFD_RELOC_THUMB_PCREL_BLX relocations to
BFD_RELOC_THUMB_PCREL_BRANCH23 for EABI v4+.
2009-04-29 DJ Delorie <dj@redhat.com>
* config/tc-mep.c (md_begin): Check coprocessor type.

View File

@ -9002,12 +9002,7 @@ do_t_blx (void)
{
/* No register. This must be BLX(1). */
inst.instruction = 0xf000e800;
#ifdef OBJ_ELF
if (EF_ARM_EABI_VERSION (meabi_flags) >= EF_ARM_EABI_VER4)
inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH23;
else
#endif
inst.reloc.type = BFD_RELOC_THUMB_PCREL_BLX;
inst.reloc.type = BFD_RELOC_THUMB_PCREL_BLX;
inst.reloc.pc_rel = 1;
}
}
@ -18213,9 +18208,13 @@ md_pcrel_from_section (fixS * fixP, segT seg)
case BFD_RELOC_THUMB_PCREL_BRANCH20:
case BFD_RELOC_THUMB_PCREL_BRANCH23:
case BFD_RELOC_THUMB_PCREL_BRANCH25:
case BFD_RELOC_THUMB_PCREL_BLX:
return base + 4;
/* BLX is like branches above, but forces the low two bits of PC to
zero. */
case BFD_RELOC_THUMB_PCREL_BLX:
return (base + 4) & ~3;
/* ARM mode branches are offset by +8. However, the Windows CE
loader expects the relocation not to take this into account. */
case BFD_RELOC_ARM_PCREL_BRANCH:
@ -19737,7 +19736,6 @@ tc_gen_reloc (asection *section, fixS *fixp)
case BFD_RELOC_THUMB_PCREL_BRANCH20:
case BFD_RELOC_THUMB_PCREL_BRANCH23:
case BFD_RELOC_THUMB_PCREL_BRANCH25:
case BFD_RELOC_THUMB_PCREL_BLX:
case BFD_RELOC_VTABLE_ENTRY:
case BFD_RELOC_VTABLE_INHERIT:
#ifdef TE_PE
@ -19746,6 +19744,15 @@ tc_gen_reloc (asection *section, fixS *fixp)
code = fixp->fx_r_type;
break;
case BFD_RELOC_THUMB_PCREL_BLX:
#ifdef OBJ_ELF
if (EF_ARM_EABI_VERSION (meabi_flags) >= EF_ARM_EABI_VER4)
code = BFD_RELOC_THUMB_PCREL_BRANCH23;
else
#endif
code = BFD_RELOC_THUMB_PCREL_BLX;
break;
case BFD_RELOC_ARM_LITERAL:
case BFD_RELOC_ARM_HWLITERAL:
/* If this is called then the a literal has