[PATCH] Clean up ARM compressed loader
Russell King - ARM Linux
linux at arm.linux.org.uk
Thu Feb 25 04:38:59 EST 2010
On Wed, Feb 24, 2010 at 11:28:45PM -0500, Nicolas Pitre wrote:
> Obviously. But that's the core of the argument: we made sure that the
> previous implementation didn't use any static within functions. Why do
> you need to do that? This is usually a bad idea anyway as this makes
> the function non reentrant.
Indeed - but having static data within a function doesn't make it non-
reentrant - having static data modified by the function can make it
non-reentrant.
I wonder if we can get around this problem a slightly different way -
instead of building the decompressor into misc.c, build it as a separate
PIC object without the -Dstatic= stuff, and verify that it contains no
read-write data.
Since these decompressors are designed to be used within the multi-threaded
environment of the kernel, they shouldn't have any read-write data within
them (or if they do, they'd better use some locking - which would make
them unusable for decompressors.)
Then we can tailor our misc.c not to use static data (which is the real
problem - not the functions being static), and the -Dstatic= hack will
go away.
More information about the linux-arm-kernel
mailing list