This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
RE: SH relocation differences in older versions of the binutils
- From: Jeff Baker <jbaker at qnx dot com>
- To: Jeff Baker <jbaker at qnx dot com>, 'DJ Delorie' <dj at redhat dot com>
- Cc: "'binutils at sources dot redhat dot com'" <binutils at sources dot redhat dot com>
- Date: Tue, 6 Jan 2004 14:04:33 -0500
- Subject: RE: SH relocation differences in older versions of the binutils
Is there any way to determine whether a binary was built with 2.12.1 vs
2.14.9 (or whatever)? To maintain the maximum level of compatibility I'd
like to be able to dynamically translate the moved relocations.
>
> Thanks.
>
> > -----Original Message-----
> > From: DJ Delorie [mailto:dj@redhat.com]
> > Sent: Monday, January 05, 2004 2:02 PM
> > To: jbaker@qnx.com
> > Cc: binutils@sources.redhat.com
> > Subject: Re: SH relocation differences in older versions of the binutils
> >
> >
> > > Does anyone have an idea on this? We're also asking Hitachi for some
> > help
> > > but they haven't responded yet.
> > >
> > > > Can someone help me figure out some code that I can use to have the
> > GNU
> > > > tools produce a binary with the following relocations?
> > > >
> > > > R_SH_SWITCH8
> >
> > If you read gas/config/tc-sh.{h,c} you'll see that this reloc is used
> > for 8-bit switch tables, for non-BFD assemblers (sh-coff?), where you
> > have a ".byte sym1 - sym2" and both syms are in .text.
> >
> > > > R_SH_GNU_VTINHERIT
> > > > R_SH_GNU_VTENTRY
> >
> > I don't think gcc will use these any more. They were used for C++
> > virtual tables and -relax.
> >
> > > > R_SH_LOOP_START
> > > > R_SH_LOOP_END
> >
> > These get emitted when you use LDRS and LDRE with "as -relax".