diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2012-07-17 15:48:04 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-14 05:50:48 -0700 |
commit | 4cfa1966cc4cec7ea37d572eca9f930b09dc3cf2 (patch) | |
tree | 4ada25b8bbc0c5406962caf716e7746656aec03c /arch/m32r | |
parent | 850cc18d180176194633acba57ff6bd443086ad9 (diff) | |
download | kernel_samsung_espresso10-4cfa1966cc4cec7ea37d572eca9f930b09dc3cf2.zip kernel_samsung_espresso10-4cfa1966cc4cec7ea37d572eca9f930b09dc3cf2.tar.gz kernel_samsung_espresso10-4cfa1966cc4cec7ea37d572eca9f930b09dc3cf2.tar.bz2 |
m32r: add memcpy() for CONFIG_KERNEL_GZIP=y
commit a8abbca6617e1caa2344d2d38d0a35f3e5928b79 upstream.
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>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/m32r')
-rw-r--r-- | arch/m32r/boot/compressed/misc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/m32r/boot/compressed/misc.c b/arch/m32r/boot/compressed/misc.c index 370d608..3147aa2 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) #endif #ifdef CONFIG_KERNEL_GZIP +void *memcpy(void *dest, const void *src, size_t n) +{ + char *d = dest; + const char *s = src; + while (n--) + *d++ = *s++; + + return dest; +} + #define BOOT_HEAP_SIZE 0x10000 #include "../../../../lib/decompress_inflate.c" #endif |