This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Bug in gas generating sh PIC, or is it me?
- From: <gp at qnx dot com>
- To: "Dan Kegel" <dank at kegel dot com>, "Graeme Peterson" <gp at qnx dot com>
- Cc: <binutils at sources dot redhat dot com>
- Date: Sat, 30 Nov 2002 06:21:40 -0000
- Subject: Re: Bug in gas generating sh PIC, or is it me?
Thanks, Dan.
I'm pretty sure that I tried this with the head branch from the GNU cvs, and
observed the same thing - the value that gets put in the .o (and then
the .so) for the jump into the .plt is 2 too big. I'm just hoping for some
pointers on how to fix it, and confirmation/correction on whether it is a
binutils bug, so that the fix can get rolled in if appropriate.
Cheers.
GP
Dan Kegel <dank@kegel.com> said:
> Graeme Peterson wrote:
> > I think I may have found a bug in the sh PIC stuff in gas. Or I may have
> > a bug in the QNX sh-nto support. Not sure which, and so this e-mail. ;-)
> >
> > Basically it looks like an "off by 2" bug to me. If I have a source
> > file which I compile PIC into a shared object, any function calls from
> > that shared object into other PIC code blows up. I can call from main()
> > into the shared object fine if the .so does not call any other PIC
> > code, like printf(), or other functions in the same .so.
> >
> > I think the following assembly gets converted to values that are 2 bigger
> > than they used to be with binutils-2.10.1 ...
>
> For what it's worth, a coworker found that on sh4,
> binutils as shipped by Hard Hat 2.0, and also
> vanilla binutils 2.13, caused problems with shared libraries.
> binutils 2.13.1 works fine.
>
> That's neither here nor there, I suppose, but I just wanted
> to point out all was not perfect with the older binutils on sh4.
> - Dan
>
>
--