[U-Boot] relocation problem on powerpc

Wolfgang Denk wd at denx.de
Mon Sep 8 22:21:26 CEST 2014


Dear Chris,

In message <CAFOYHZASBbTctq4fRJNX2e8=r_ocWosODnQ5R80wGa1GFzGyqg at mail.gmail.com> you wrote:
>
...
> > Which yields the following output
> >
> >   NetArpWaitTimerStart = 0
> >   &NetArpWaitTimerStart = f00000d0
> >   NetArpWaitTry = 1
> >   &NetArpWaitTry = 7ffb0058
> >   NetArpWaitTxPacketSize = 42
> >   &NetArpWaitTxPacketSize = 7ffb0078
--------------------------------^^^^^^^^

This also looks fishy!

> I'm not confident enough to say it's a fix but the following seems to
> solve the relocation problem for NetArpWaitTimerStart.
> 
> diff --git a/arch/powerpc/cpu/mpc85xx/u-boot.lds
> b/arch/powerpc/cpu/mpc85xx/u-boot.lds
> index 2cf0b25..36711b0 100644
> --- a/arch/powerpc/cpu/mpc85xx/u-boot.lds
> +++ b/arch/powerpc/cpu/mpc85xx/u-boot.lds
> @@ -54,7 +54,7 @@ SECTIONS
>      _FIXUP_TABLE_ = .;
>      KEEP(*(.fixup))
>    }
> -  __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
> +  __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2);

Well, in your list above the _two_ entries at the end are wrong, so
adding _one_ entry here is probably wrong, too.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
You can only live once, but if you do it right, once is enough.


More information about the U-Boot mailing list