aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m32r/boot
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2012-07-17 18:48:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-17 19:21:30 -0400
commita8abbca6617e1caa2344d2d38d0a35f3e5928b79 (patch)
treee107379b1ab3ab636f9505d338aa74f628a615cd /arch/m32r/boot
parentdf12aef6a19bb2d69859a94936bda0e6ccaf3327 (diff)
m32r: add memcpy() for CONFIG_KERNEL_GZIP=y
Fix the m32r link error: LD arch/m32r/boot/compressed/vmlinux arch/m32r/boot/compressed/misc.o: In function `zlib_updatewindow': misc.c:(.text+0x190): undefined reference to `memcpy' misc.c:(.text+0x190): relocation truncated to fit: R_M32R_26_PLTREL against undefined symbol `memcpy' make[5]: *** [arch/m32r/boot/compressed/vmlinux] Error 1 by adding our own implementation of memcpy(). Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Hirokazu Takata <takata@linux-m32r.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m32r/boot')
-rw-r--r--arch/m32r/boot/compressed/misc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/m32r/boot/compressed/misc.c b/arch/m32r/boot/compressed/misc.c
index 370d60881977..3147aa248b93 100644
--- a/arch/m32r/boot/compressed/misc.c
+++ b/arch/m32r/boot/compressed/misc.c
@@ -39,6 +39,16 @@ static void *memset(void *s, int c, size_t n)
39#endif 39#endif
40 40
41#ifdef CONFIG_KERNEL_GZIP 41#ifdef CONFIG_KERNEL_GZIP
42void *memcpy(void *dest, const void *src, size_t n)
43{
44 char *d = dest;
45 const char *s = src;
46 while (n--)
47 *d++ = *s++;
48
49 return dest;
50}
51
42#define BOOT_HEAP_SIZE 0x10000 52#define BOOT_HEAP_SIZE 0x10000
43#include "../../../../lib/decompress_inflate.c" 53#include "../../../../lib/decompress_inflate.c"
44#endif 54#endif