On Fri, 24 Feb 2006, Matt Mackall wrote:
> This is a refactored version of the lib/inflate.c:
>
> - clean up some really ugly code
> - clean up atrocities like '#include "../../../lib/inflate.c"'
> - drop a ton of cut and paste code from the kernel boot
> - move towards making the boot decompressor pluggable
> - move towards unifying the multiple inflate implementations
> - save space
Could you also make sure that there is no non-const global variables
whatsoever in there? The idea is that on ARM the decompressor was once
made to be executable directly from flash so the deflated kernel image
would be stored at its final location in ram directly without first
copying zImage nor any .data to ram in order to execute it. This is a
significant boot time saving (which I think CE Linux is interested in)
while still preserving a compressed kernel in flash.
Currently:
$ size lib/zlib_inflate/zlib_inflate.o
text data bss dec hex filename
11868 68 0 11936 2ea0 lib/zlib_inflate/zlib_inflate.o
Since this code is probably reentrant already, global variables are most
probably read-only and declaring them const will store their content
into .rodata which should be accounted as text above.
Having an empty .data section is the easiest way to be sure the kernel
decompressor can actually execute from flash without subtle bugs due to
the enforced read-only nature of global variables.
Nicolas
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]