[U-Boot] [PATCH] dlmalloc: remove manual reloc alias warning

Wolfgang Denk wd at denx.de
Sat Sep 1 14:02:31 CEST 2012


Dear Andreas,

In message <20120901101031.2DA15205615 at 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 at denx.de
All your people must learn before you can reach for the stars.
	-- Kirk, "The Gamesters of Triskelion", stardate 3259.2


More information about the U-Boot mailing list