From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Hirokazu Takata <takata@linux-m32r.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-m32r@ml.linux-m32r.org, linux-kernel@vger.kernel.org,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH 5/6] m32r: Add memcpy() for CONFIG_KERNEL_GZIP=y
Date: Fri, 13 Jul 2012 23:20:26 +0200 [thread overview]
Message-ID: <1342214427-17607-5-git-send-email-geert@linux-m68k.org> (raw)
In-Reply-To: <1342214427-17607-1-git-send-email-geert@linux-m68k.org>
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'
misc.c:(.text+0x1e0): undefined reference to `memcpy'
misc.c:(.text+0x1e0): relocation truncated to fit: R_M32R_26_PLTREL against undefined symbol `memcpy'
misc.c:(.text+0x218): undefined reference to `memcpy'
misc.c:(.text+0x218): relocation truncated to fit: R_M32R_26_PLTREL against undefined symbol `memcpy'
arch/m32r/boot/compressed/misc.o: In function `zlib_inflate':
misc.c:(.text+0x171c): undefined reference to `memcpy'
misc.c:(.text+0x171c): relocation truncated to fit: R_M32R_26_PLTREL against undefined symbol `memcpy'
make[5]: *** [arch/m32r/boot/compressed/vmlinux] Error 1
Add our own implementation of memcpy() to fix this.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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
--
1.7.0.4
next prev parent reply other threads:[~2012-07-13 21:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-13 21:20 [PATCH 1/6] m32r: Remove duplicate definition of PTRACE_O_TRACESYSGOOD Geert Uytterhoeven
2012-07-13 21:20 ` [PATCH 2/6] m32r: Fix pull clearing RESTORE_SIGMASK into block_sigmask() fallout Geert Uytterhoeven
2012-07-13 21:20 ` [PATCH 3/6] m32r: Fix 'fix breakage from "m32r: use generic ptrace_resume code"' fallout Geert Uytterhoeven
2012-07-13 21:20 ` [PATCH 4/6] m32r: Consistently use "suffix-$(...)" Geert Uytterhoeven
2012-07-13 21:20 ` Geert Uytterhoeven [this message]
2012-07-13 21:20 ` [PATCH 6/6] m32r: Make memset() global for CONFIG_KERNEL_BZIP2=y Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1342214427-17607-5-git-send-email-geert@linux-m68k.org \
--to=geert@linux-m68k.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m32r@ml.linux-m32r.org \
--cc=takata@linux-m32r.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®