提交 5ceaa2f3 编写于 作者: R Russell King 提交者: Linus Torvalds

decompress: fix new decompressor for PIC

The ARM kernel decompressor wants to be able to relocate r/w data
independently from the rest of the image, and we do this by ensuring that
r/w data has global visibility.  Define STATIC_RW_DATA to be empty to
achieve this.
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
Cc: Alain Knaff <alain@knaff.lu>
Cc: <stable@kernel.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 8c1840f1
...@@ -14,11 +14,21 @@ ...@@ -14,11 +14,21 @@
/* Code active when included from pre-boot environment: */ /* 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 /* A trivial malloc implementation, adapted from
* malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
*/ */
static unsigned long malloc_ptr; STATIC_RW_DATA unsigned long malloc_ptr;
static int malloc_count; STATIC_RW_DATA int malloc_count;
static void *malloc(int size) static void *malloc(int size)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册