aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAndries E. Brouwer <andries.brouwer@cwi.nl>2004-11-13 04:58:26 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-11-13 04:58:26 -0800
commitc9fbb54a91376e9fe628a78e9849dbf567fcf853 (patch)
tree1e17da9ae75d2e331ae26b2a81fe776629bb62a3 /lib
parent07741cd4918db17aefeaeb319d5875562f7aa66a (diff)
downloadhistory-c9fbb54a91376e9fe628a78e9849dbf567fcf853.tar.gz
[PATCH] __init for inflate.c
In do_mounts_rd.c and initramfs.c there are many references from .text to .text.init because of the inclusion of lib/inflate.c. The below adds INIT markup in lib/inflate.c.
Diffstat (limited to 'lib')
-rw-r--r--lib/inflate.c40
1 files changed, 22 insertions, 18 deletions
diff --git a/lib/inflate.c b/lib/inflate.c
index 6a9cac881978b8..75e7d303c72ed9 100644
--- a/lib/inflate.c
+++ b/lib/inflate.c
@@ -118,6 +118,10 @@ static char rcsid[] = "#Id: inflate.c,v 0.14 1993/06/10 13:27:04 jloup Exp #";
#include "gzip.h"
#define STATIC
#endif /* !STATIC */
+
+#ifndef INIT
+#define INIT
+#endif
#define slide window
@@ -139,15 +143,15 @@ struct huft {
/* Function prototypes */
-STATIC int huft_build OF((unsigned *, unsigned, unsigned,
+STATIC int INIT huft_build OF((unsigned *, unsigned, unsigned,
const ush *, const ush *, struct huft **, int *));
-STATIC int huft_free OF((struct huft *));
-STATIC int inflate_codes OF((struct huft *, struct huft *, int, int));
-STATIC int inflate_stored OF((void));
-STATIC int inflate_fixed OF((void));
-STATIC int inflate_dynamic OF((void));
-STATIC int inflate_block OF((int *));
-STATIC int inflate OF((void));
+STATIC int INIT huft_free OF((struct huft *));
+STATIC int INIT inflate_codes OF((struct huft *, struct huft *, int, int));
+STATIC int INIT inflate_stored OF((void));
+STATIC int INIT inflate_fixed OF((void));
+STATIC int INIT inflate_dynamic OF((void));
+STATIC int INIT inflate_block OF((int *));
+STATIC int INIT inflate OF((void));
/* The inflate algorithm uses a sliding 32 K byte window on the uncompressed
@@ -272,7 +276,7 @@ STATIC const int dbits = 6; /* bits in base distance lookup table */
STATIC unsigned hufts; /* track memory usage */
-STATIC int huft_build(
+STATIC int INIT huft_build(
unsigned *b, /* code lengths in bits (all assumed <= BMAX) */
unsigned n, /* number of codes (assumed <= N_MAX) */
unsigned s, /* number of simple-valued codes (0..s-1) */
@@ -491,7 +495,7 @@ DEBG("huft7 ");
-STATIC int huft_free(
+STATIC int INIT huft_free(
struct huft *t /* table to free */
)
/* Free the malloc'ed tables built by huft_build(), which makes a linked
@@ -513,7 +517,7 @@ STATIC int huft_free(
}
-STATIC int inflate_codes(
+STATIC int INIT inflate_codes(
struct huft *tl, /* literal/length decoder tables */
struct huft *td, /* distance decoder tables */
int bl, /* number of bits decoded by tl[] */
@@ -628,7 +632,7 @@ STATIC int inflate_codes(
-STATIC int inflate_stored(void)
+STATIC int INIT inflate_stored(void)
/* "decompress" an inflated type 0 (stored) block. */
{
unsigned n; /* number of bytes in block */
@@ -689,7 +693,7 @@ DEBG("<stor");
/*
* We use `noinline' here to prevent gcc-3.5 from using too much stack space
*/
-STATIC int noinline inflate_fixed(void)
+STATIC int noinline INIT inflate_fixed(void)
/* decompress an inflated type 1 (fixed Huffman codes) block. We should
either replace this with a custom decoder, or at least precompute the
Huffman tables. */
@@ -745,7 +749,7 @@ DEBG("<fix");
/*
* We use `noinline' here to prevent gcc-3.5 from using too much stack space
*/
-STATIC int noinline inflate_dynamic(void)
+STATIC int noinline INIT inflate_dynamic(void)
/* decompress an inflated type 2 (dynamic Huffman codes) block. */
{
int i; /* temporary variables */
@@ -926,7 +930,7 @@ DEBG("dyn7 ");
-STATIC int inflate_block(
+STATIC int INIT inflate_block(
int *e /* last block flag */
)
/* decompress an inflated block */
@@ -977,7 +981,7 @@ STATIC int inflate_block(
-STATIC int inflate(void)
+STATIC int INIT inflate(void)
/* decompress an inflated entry */
{
int e; /* last block flag */
@@ -1039,7 +1043,7 @@ static ulg crc; /* initialized in makecrc() so it'll reside in bss */
* gzip-1.0.3/makecrc.c.
*/
-static void
+static void INIT
makecrc(void)
{
/* Not copyrighted 1990 Mark Adler */
@@ -1087,7 +1091,7 @@ makecrc(void)
/*
* Do the uncompression!
*/
-static int gunzip(void)
+static int INIT gunzip(void)
{
uch flags;
unsigned char magic[2]; /* magic header */