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]
Other format: [Raw text]

Re: Bug in gas generating sh PIC, or is it me?


So far it looks good.  I am working from home, and the sh-nto machine in
our lab is not booted right now, so I will have to wait for a runtime
test.

But the values in the .o and .so look good!

Cheers, and thanks again.

Now for MIPS.

:-)

GP

On Sat, 30 Nov 2002 gp@qnx.com wrote:

> This is great!  Thank you!
> 
> And Alan, thanks for the explanation.  Now I know where I should have been 
> looking in the code.  ;-)
> 
> We are moving forward to gcc.3x across the board 'RSN' (tm), but for now we 
> are stuck with 2.95.3.  Updating the binutils will help a lot on some other 
> issues, though.
> 
> Thanks again.
> I'll try it right now.
> 
> Cheers.
> GP
> 
> kaz Kojima <kkojima@rr.iij4u.or.jp> said:
> 
> > Hi,
> > 
> > <gp@qnx.com> wrote:
> > >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.
> > 
> > I've looked this closely. Yes, it's a bug of SH gas. The PIC expression
> > 
> >   bar@PLT+.-2-.L4
> > 
> > isn't assembled correctly as you pointed out. This is related with a
> > backward-compatibility about how gcc generates such expressions.
> > Current gcc uses an expression like
> > 
> >   f@PLT - (.LPCS# + 2 - .)
> > 
> > and old gcc used a complex expression like
> > 
> >   f@PLT + . - (.LPCS# + 2)
> > 
> > and gas transforms the latter to the former internally.
> > Unfortunately, it handles bar@PLT+.-2-.L4 wrongly without making it an
> > error. I've fixed it in my local tree and will come up with a patch
> > and an appropriate testcase. Thank you for your report.
> > 
> > BTW, gcc-2.95.3 would be a very bad choice for SH. I believe that it's
> > too old and has too many other serious problems on this target.
> > Perhaps it's a reason of why this bug was missed :-)
> > 
> > Regards,
> > 	kaz
> > 
> 
> 
> 
> -- 
> 
> 
> 
> 


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