A relocation problem in shared objects for SH

kaz Kojima kkojima@rr.iij4u.or.jp
Sun Sep 17 16:16:00 GMT 2000


Richard Henderson <rth@cygnus.com> wrote:
> On Fri, Sep 15, 2000 at 11:24:04AM +0900, kaz Kojima wrote:
> > elf32-sh.c is used for COFF too and COFF relocs don't use the addend.
> 
> I don't see that.  I see
> 
>    FIXME:
>    There is a lot of duplication here between this code and the COFF
>    specific code.
> 
> In any case, if you're going to do silly things with memory,
> I think you're better off using REL relocations instead.

Alexandre Oliva has given a solution for the original problem.
Anyway, the current elf32-sh.c uses RELA and in place relocation
as the above comment. I don't know why, but there may be such
requests when Ian wrote it.
Maybe, elf32-sh-lin.c should be rewrote so as to use only pure REL
(or RELA) relocations as your suggestion.
Thank you for your advice.

	kaz


More information about the Binutils mailing list