From 35d3d567ccaa9db98392c3787e4d5409c13701e8 Mon Sep 17 00:00:00 2001 From: Thiemo Seufer Date: Thu, 20 Jul 2006 16:46:30 +0000 Subject: [ bfd/ChangeLog ] * elf32-mips.c (mips16_jump_reloc): Remove function. (elf_mips16_howto_table_rel): Use _bfd_mips_elf_generic_reloc instead of mips16_jump_reloc. * elf64_mips.c, wlfn32-mips.c (mips16_jump_reloc): Remove function. (elf_mips16_howto_table_rel, elf_mips16_howto_table_rela): Use _bfd_mips_elf_generic_reloc instead of mips16_jump_reloc. [ gas/ChangeLog ] * config/tc-mips.c (mips_fix_adjustable): Handle BFD_RELOC_MIPS16_JMP. (tc_gen_reloc): Handle mips16 jumps to section symbol offsets. [ ld/testsuite/ChangeLog ] * ld-mips-elf/mips16-call-global-1.s, ld-mips-elf/mips16-call-global-2.s, ld-mips-elf/mips16-call-global-3.s, ld-mips-elf/mips16-call-global.d: Test linking of external mips16 jumps. * ld-mips-elf/mips-elf.exp: Run new test. --- gas/ChangeLog | 5 +++++ gas/config/tc-mips.c | 9 ++++----- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'gas') diff --git a/gas/ChangeLog b/gas/ChangeLog index 999b795..dcb7a33 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2006-07-20 Thiemo Seufer + + * config/tc-mips.c (mips_fix_adjustable): Handle BFD_RELOC_MIPS16_JMP. + (tc_gen_reloc): Handle mips16 jumps to section symbol offsets. + 2006-07-19 Paul Brook * config/tc-arm.c (insns): Fix rbit Arm opcode. diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index abe4630..788a34b 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -13498,11 +13498,6 @@ md_estimate_size_before_relax (fragS *fragp, asection *segtype) int mips_fix_adjustable (fixS *fixp) { - /* Don't adjust MIPS16 jump relocations, so we don't have to worry - about the format of the offset in the .o file. */ - if (fixp->fx_r_type == BFD_RELOC_MIPS16_JMP) - return 0; - if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) return 0; @@ -13578,6 +13573,10 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp) else reloc->addend = fixp->fx_addnumber; + /* Handle relocs adjusted against a section symbol. */ + if (fixp->fx_r_type == BFD_RELOC_MIPS16_JMP) + reloc->addend += fixp->fx_offset; + /* Since the old MIPS ELF ABI uses Rel instead of Rela, encode the vtable entry to be used in the relocation's section offset. */ if (! HAVE_NEWABI && fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) -- cgit v1.1