|
@@ -1487,11 +1487,11 @@ static mbinptr av_[NAV * 2 + 2] = {
|
|
#ifdef CONFIG_NEEDS_MANUAL_RELOC
|
|
#ifdef CONFIG_NEEDS_MANUAL_RELOC
|
|
void malloc_bin_reloc (void)
|
|
void malloc_bin_reloc (void)
|
|
{
|
|
{
|
|
- unsigned long *p = (unsigned long *)(&av_[2]);
|
|
|
|
- int i;
|
|
|
|
- for (i=2; i<(sizeof(av_)/sizeof(mbinptr)); ++i) {
|
|
|
|
- *p++ += gd->reloc_off;
|
|
|
|
- }
|
|
|
|
|
|
+ mbinptr *p = &av_[2];
|
|
|
|
+ size_t i;
|
|
|
|
+
|
|
|
|
+ for (i = 2; i < ARRAY_SIZE(av_); ++i, ++p)
|
|
|
|
+ *p = (mbinptr)((ulong)*p + gd->reloc_off);
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|