[U-Boot] Relocation issue - need help!

Dirk Eibach dirk.eibach at gdsys.cc
Thu Oct 23 08:01:45 CEST 2014


Hello Wolfgang,

2014-10-22 18:56 GMT+02:00 Wolfgang Denk <wd at denx.de>:
> Dear Dirk,
>
> In message <CANVMifLGzKz+=-K-E9_sSXBxpYPdG1YqEXc-tsCApi7WVxQAHg at mail.gmail.com> you wrote:
>> I had exactly the same behaviour some time ago and tracked it down to
>> this (and posted it on the mailing list, but sadly got no feedback):
>
> Thanks a lot for this pointer.

I am really glad this was helpful. It was very nasty to track down, so
I was really concerned when I found it. For that reson I chose "u-boot
ppc does not work with gcc 4.8" as a topic when I reported it to
U-Boot mailing list and put you on CC on august 5th. But maybe I
should have been more explicit, something like "APOCALYPSE NOW: u-boot
ppc does not work with gcc 4.8" ;)

This problem is *not* fixed by the links Marek addressed.

Just a quick explanation of what is going on:
Since gcc 4.8 we have new sections .data.rel.ro and
.data.rel.ro.local. They contain absolute addresses that should really
be fixed up in our relocation process but are not considered yet.
In your case  you wre running u-boot referencing the not fixed-up
addresses which worked perfectly as long as they still pointed to
valid content. But as soon as you erased flash this was no longer the
case. To make debugging even more fun, behaviour also depends on cache
contents.

In my original mail I referenced this potential solution, at least it
worked for me:
https://gcc.gnu.org/ml/gcc-help/2014-02/msg00054.html

Cheers
DIrk


More information about the U-Boot mailing list