Does --relax work on mainline for H8/300H/H8S?
Eric Christopher
echristo@redhat.com
Thu Sep 4 19:38:00 GMT 2003
On Thu, 2003-09-04 at 09:33, Gary R Van Sickle wrote:
> I can't seem to get --relax to work on mainline ld + mainline gcc, at least
> on the H8
It worked on the ppc last time I used it, oh, say a month ago.
> cross. All I get is a slew of "relocation truncated to fit" warnings from
> the linker. It's been this way for quite a while now.
>
Ouch.
> - What exactly does "relocation truncated to fit" mean anyway, and what
> other than an ld bug might cause it? I can't find
> any documentation on this.
It means that the amount of data you are trying to put into a relocation
(addend) is larger than the amount of the relocation. think of trying to
stuff 16-bits into a space where you only have 8.
It is likely a bfd bug, but it could be a compiler/user bug if, for
example, the compiler is trying to generate a branch that even with
relaxation is going to overflow a branch relocation. (For example a 64MB
branch on ppc before we implemented branch stubs...)
> - Assuming this is a legit bug, what can I do to help diagnose and fix it?
>
> I guess what I'm trying to say is that I don't know enough about what's
> going on here to generate a testcase, or I'd have submitted a proper bug
> report.
I hate finding these too. :)
Best thing is to figure out first, _which_ relocation is overflowing and
why.
--
Eric Christopher <echristo@redhat.com>
More information about the Binutils
mailing list