This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: revised patch for m32r gas relocations
Donald Lindsay writes:
> >
> > Also, methinks I would like to see the rewrite of m32r_elf_lo16_reloc
> > undone now that there is m32r_elf_generic_reloc.
>
> The logic certainly could be merged, but I'd rather do that as a separate
> patch, after we agree that this patch works (or agree on how to make it
> work).
There's no incentive to do the cleanup once the patch goes in,
and since undoing the lo16 rewrite is TRT, it should be part
of this patch.
The cleanup is trivial: go back to the way things were but
instead of calling bfd_elf_generic_reloc, call m32r_elf_generic_reloc
instead. I'm not talking about spending more than 2 minutes
(plus the time to rerun the tests - but you have to do that anyway to
fix the current problems with m32r_elf_generic_reloc).
m32r_elf_lo16_reloc use to end with this:
/* Now do the LO16 reloc in the usual way. */
return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message);
Change that to:
/* Now do the LO16 reloc in the usual way.
??? It would be nice to call bfd_elf_generic_reloc here,
but we have partial_inplace == TRUE. bfd_elf_generic_reloc will
pass the handling back to bfd_install_relocation which will install
a section relative addend which is wrong. */
return m32r_elf_generic_reloc (input_bfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message);
[keeping the renaming of abfd to input_bfd]
If the cleanup doesn't go in now, then when doing the cleanup one
might want to run the testsuite AGAIN. It's _easier_ doing it now.