[PATCH 3/3] ARM: zImage: fix issues with missing GOT entries for some global variables
Nicolas Pitre
nicolas.pitre at linaro.org
Wed Apr 20 08:47:17 EDT 2011
On Wed, 20 Apr 2011, Uwe Kleine-König wrote:
> Hello,
>
> On Wed, Apr 20, 2011 at 08:28:20AM -0400, Nicolas Pitre wrote:
> > On Wed, 20 Apr 2011, Uwe Kleine-König wrote:
> > > On Wed, Apr 20, 2011 at 12:15:04AM -0400, Nicolas Pitre wrote:
> > > > +#define static /* non-static */
> > > > #include <mach/uncompress.h>
> > > > +#undef static
> > > This has a strange side effect, i.e.
> > >
> > > static something *ptr;
> > >
> > > isn't initialised to NULL anymore IIRC. So the maintainers of
> > > the various mach/uncompress.h still need to be aware of the issue.
> >
> > Please tell me more about your setup. This should still be initialized
> > to NULL. If not then something else is still wrong.
> I didn't test your branch. If you say that non-static data is
> zero-initialised, too, I believe you without further checking.
Uninitialized variables are allocated to the .bss section, regardless if
they're static or not. The static keyword only affects the global
visibility of the variable, and as a side effect the optimization that
can be performed on that access. Here the goal is to prevent gcc from
applying such optimizations.
Nicolas
More information about the linux-arm-kernel
mailing list