
1 Sep
2012
1 Sep
'12
2:02 p.m.
Dear Andreas,
In message 20120901101031.2DA15205615@gemini.denx.de I wrote:
i. e. this has the offset 2 added twice, so it is missing the first two real entries, env writing beyond the end of the array.
Please ignore me. Seems my brain is still in vacation mode.
However, I really wonder why you say this code would be causing runtime errors for you:
mbinptr *p = &av_[2]; int i;
for (i = 2; i < ARRAY_SIZE(av_); ++i) *p = (mbinptr)((ulong)*p + gd->reloc_off);
It looks good to me.
Can you please add some debug printf()s to find out how the old code and this one differ in their results?
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@denx.de
All your people must learn before you can reach for the stars.
-- Kirk, "The Gamesters of Triskelion", stardate 3259.2