This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A relocation problem in shared objects for SH


> 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
> 

The elf32-sh supports both REL and RELA relocation types, because
binutils generates one (REL I think) and Hitachi SHC generates the
other (RELA, I think).

If you remove support for one of the types, it may create
problems when linking with Hitachi SHC created object files.

Toshi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]