From bf035d9d3bd8fc236bfdfbea00329d389de05b07 Mon Sep 17 00:00:00 2001 From: Russell King Date: Wed, 10 Mar 2010 15:23:53 -0800 Subject: [PATCH] --- yaml --- r: 187308 b: refs/heads/master c: 5ceaa2f39bfa73c4398cd01e78f1c3ebde3d3383 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/decompress/mm.h | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 35bb3b3a8b2a..c638252baeb2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8c1840f15feecb6961f480cad1a7a8e53a3f2ba6 +refs/heads/master: 5ceaa2f39bfa73c4398cd01e78f1c3ebde3d3383 diff --git a/trunk/include/linux/decompress/mm.h b/trunk/include/linux/decompress/mm.h index 5032b9a31ae7..ad5ec1d0475e 100644 --- a/trunk/include/linux/decompress/mm.h +++ b/trunk/include/linux/decompress/mm.h @@ -14,11 +14,21 @@ /* Code active when included from pre-boot environment: */ +/* + * Some architectures want to ensure there is no local data in their + * pre-boot environment, so that data can arbitarily relocated (via + * GOT references). This is achieved by defining STATIC_RW_DATA to + * be null. + */ +#ifndef STATIC_RW_DATA +#define STATIC_RW_DATA static +#endif + /* A trivial malloc implementation, adapted from * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 */ -static unsigned long malloc_ptr; -static int malloc_count; +STATIC_RW_DATA unsigned long malloc_ptr; +STATIC_RW_DATA int malloc_count; static void *malloc(int size) {