Skip to content

Commit

Permalink
wrap memcpy to push down GLIBC dependency in static binary
Browse files Browse the repository at this point in the history
  • Loading branch information
poruloh committed Mar 31, 2019
1 parent dec140e commit 10fe822
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/memcpy.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include <cstring>

/* some systems do not have newest memcpy@@GLIBC_2.14 - stay with old good one */
asm (".symver memcpy, memcpy@GLIBC_2.2.5");

extern "C" void *__wrap_memcpy(void *dest, const void *src, size_t n)
{
return memcpy(dest, src, n);
}

0 comments on commit 10fe822

Please sign in to comment.