[patch] make inflate work with gcc3.5 and 4k stacks

From: Matt Mackall
Date: Sat Mar 20 2004 - 14:52:59 EST


Quick fix to work around gcc3.5's automatic inline and broken stack
requirements calculation. Without this, I see stack overflows at boot
with 4k stacks.

gcc3.5 - fix inflate inlining

tiny-mpm/lib/inflate.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN lib/inflate.c~inflate-noinline lib/inflate.c
--- tiny/lib/inflate.c~inflate-noinline 2004-03-20 13:39:18.000000000 -0600
+++ tiny-mpm/lib/inflate.c 2004-03-20 13:40:13.000000000 -0600
@@ -686,7 +686,7 @@ DEBG("<stor");



-STATIC int inflate_fixed(void)
+STATIC int noinline 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. */
@@ -740,7 +740,7 @@ DEBG("<fix");



-STATIC int inflate_dynamic(void)
+STATIC int noinline inflate_dynamic(void)
/* decompress an inflated type 2 (dynamic Huffman codes) block. */
{
int i; /* temporary variables */

_


--
Matt Mackall : http://www.selenic.com : Linux development and consulting
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/