aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/inflate.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2011-03-09 16:20:13 +0000
committerJan Beulich <jbeulich@novell.com>2011-03-09 16:20:13 +0000
commit48115d14743e4134fcdd0b8766fc59c917ae1e79 (patch)
tree844da1e931139c0b614f55c71ec9433d166c5c19 /xen/common/inflate.c
parent4afea3d65321c40bb8afec833c860f92176bfb42 (diff)
downloadxen-48115d14743e4134fcdd0b8766fc59c917ae1e79.tar.gz
xen-48115d14743e4134fcdd0b8766fc59c917ae1e79.tar.bz2
xen-48115d14743e4134fcdd0b8766fc59c917ae1e79.zip
Move more kernel decompression bits to .init.* sections
Based on how c/s 22986:076b63b74cf6 changed xen/libelf/Makefile I suppose this is compatibile with those clang/llvm changes, but I didn't actually test it. Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/common/inflate.c')
-rw-r--r--xen/common/inflate.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/xen/common/inflate.c b/xen/common/inflate.c
index 999a33bce0..f99c985d61 100644
--- a/xen/common/inflate.c
+++ b/xen/common/inflate.c
@@ -120,6 +120,7 @@ static char rcsid[] = "#Id: inflate.c,v 0.14 1993/06/10 13:27:04 jloup Exp #";
#ifndef INIT
#define INIT
+#define INITDATA
#endif
#define slide window
@@ -216,8 +217,8 @@ static const ush cpdext[] = { /* Extra bits for distance codes */
the stream.
*/
-STATIC ulg bb; /* bit buffer */
-STATIC unsigned bk; /* bits in bit buffer */
+STATIC ulg INITDATA bb; /* bit buffer */
+STATIC unsigned INITDATA bk; /* bits in bit buffer */
STATIC const ush mask_bits[] = {
0x0000,
@@ -234,10 +235,10 @@ STATIC const ush mask_bits[] = {
* malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
*/
-static unsigned long malloc_ptr;
-static int malloc_count;
+static unsigned long INITDATA malloc_ptr;
+static int INITDATA malloc_count;
-static void *malloc(int size)
+static void *INIT malloc(int size)
{
void *p;
@@ -258,7 +259,7 @@ static void *malloc(int size)
return p;
}
-static void free(void *where)
+static void INIT free(void *where)
{
malloc_count--;
if (!malloc_count)
@@ -311,7 +312,7 @@ STATIC const int dbits = 6; /* bits in base distance lookup table */
#define N_MAX 288 /* maximum number of codes in any set */
-STATIC unsigned hufts; /* track memory usage */
+STATIC unsigned INITDATA hufts; /* track memory usage */
STATIC int INIT huft_build(
@@ -1129,8 +1130,8 @@ STATIC int INIT inflate(void)
*
**********************************************************************/
-static ulg crc_32_tab[256];
-static ulg crc; /* initialized in makecrc() so it'll reside in bss */
+static ulg INITDATA crc_32_tab[256];
+static ulg INITDATA crc; /* initialized in makecrc() so it'll reside in bss */
#define CRC_VALUE (crc ^ 0xffffffffUL)
/*