[U-Boot] relocation problem on powerpc
Chris Packham
judge.packham at gmail.com
Tue Sep 9 00:10:26 CEST 2014
Hi Wolfgang,
On Tue, Sep 9, 2014 at 8:21 AM, Wolfgang Denk <wd at denx.de> wrote:
> 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!
Do you mean the address or the value? FYI the 77fb0000 addresses are
what I believe to be the correct relocated address. It's the f00000d0
address for NetArpWaitTimerStart that I believe is causing the problem
I am seeing.
>
>> 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.
I think there's only one entry that is wrong.
> 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