[U-Boot] [RFC] ARM: prevent misaligned array inits

Albert ARIBAUD albert.u.boot at aribaud.net
Tue Oct 2 23:20:00 CEST 2012


Hi Stephen,

On Tue, 02 Oct 2012 14:06:53 -0600, Stephen Warren
<swarren at wwwdotorg.org> wrote:

> > +c) Relax the -munified-access rule globally. This will prevent native
> 
> I assume that's meant to say -munaligned-access?

> > +   until the target gets compiled with m-unaligned-access.
> 
> s/m-/-m/

> > +d) Relax the -munified-access rule only for for files susceptible to
> 
> I assume that's meant to say -munaligned-access?

Thanks for spotting these. Fixed in next round.

> > +   the local initialized array issue. This minimizes the quantity of
> > +   code which can hide unwanted misaligned accesses.
> > +
> > +Considering the rarity of actual occurrences (as of this writing, 5
> > +files out of 7840 in U-Boot, or .3%, contain an initialized local char
> > +array which cannot actually be replaced with a const char*), detection
> > +if the issue in patches should not be asked from contributors.
> 
> I assume therefore that option (d) was chosen. Perhaps state this
> explicitly?

Thanks for pointing out the ambiguity: indeed option d) is the one
chosen. Made explicit in next round.

Thanks again!

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list