This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Fix MIPS16 section-relative addressing
- From: Richard Sandiford <richard at codesourcery dot com>
- To: Thiemo Seufer <ths at networkno dot de>
- Cc: binutils at sourceware dot org
- Date: Wed, 26 Jul 2006 23:07:41 +0100
- Subject: Re: [PATCH] Fix MIPS16 section-relative addressing
- References: <20060720164553.GF4350@networkno.de>
Thiemo Seufer <ths@networkno.de> writes:
> @@ -13578,6 +13573,10 @@ tc_gen_reloc (asection *section ATTRIBUT
> 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)
Can you add a comment saying why this special handling is only
needed for BFD_RELOC_MIPS16_JMP? Would it work if we removed the
code above and at the same time removed the special "*valP = 0;"
case in md_apply_fix3? (This may be a daft question -- I haven't
tried. ;))
It just seems odd on the face of it that what is now a
_bfd_mips_elf_generic_reloc
Richard