]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add Valgrind's implementation of memmove to avoid link issue
authorPetar Jovanovic <mips32r2@gmail.com>
Fri, 15 Feb 2013 03:12:17 +0000 (03:12 +0000)
committerPetar Jovanovic <mips32r2@gmail.com>
Fri, 15 Feb 2013 03:12:17 +0000 (03:12 +0000)
One of the recent changes, r2682 (Make HReg a struct), caused a build
break on several x86_64 and MIPS build bots/platforms that used older
gcc versions. The issue was that compilers generated calls to memmove,
and since it was built with -nodefaultlibs, the entry could not be
resolved. The fix wraps VG_(memmove) in memmove().

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13288

coregrind/m_main.c

index ad028c8597a12e4f793b1a444640608fad58a8dd..e0df961c16486e018eb527e55f26f52bbcaf7298 100644 (file)
@@ -2636,8 +2636,8 @@ static void final_tidyup(ThreadId tid)
 
    From this derive two requirements:
 
-   1. gcc may emit calls to memcpy and memset to deal with structure
-      assignments etc.  Since we have chosen to ignore all the
+   1. gcc may emit calls to memcpy, memmove and memset to deal with
+      structure assignments etc.  Since we have chosen to ignore all the
       "normal" supporting libraries, we have to provide our own
       implementations of them.  No problem.
 
@@ -2651,6 +2651,10 @@ void* memcpy(void *dest, const void *src, SizeT n);
 void* memcpy(void *dest, const void *src, SizeT n) {
    return VG_(memcpy)(dest,src,n);
 }
+void* memmove(void *dest, const void *src, SizeT n);
+void* memmove(void *dest, const void *src, SizeT n) {
+   return VG_(memmove)(dest,src,n);
+}
 void* memset(void *s, int c, SizeT n);
 void* memset(void *s, int c, SizeT n) {
   return VG_(memset)(s,c,n);