This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Does --relax work on mainline for H8/300H/H8S?
- From: Eric Christopher <echristo at redhat dot com>
- To: Gary R Van Sickle <tiberius at braemarinc dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 04 Sep 2003 12:38:05 -0700
- Subject: Re: Does --relax work on mainline for H8/300H/H8S?
- References: <00dd01c37302$4fcc3e20$2101a8c0@BRAEMARINC.COM>
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>