-
-
Save hshrzd/c96268a67f7da7b6a831ae68b080a7ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Compile: | |
gcc -fPIC -c -m32 memcmp.c -o memcmp.o | |
gcc -shared -m32 -o memcmp.so memcmp.o | |
*/ | |
#include <stdio.h> | |
int memcmp(const void *s1, const void *s2, size_t n) | |
{ | |
printf("s1: %s\n", (char*)s1); | |
printf("s2: %s\n", (char*)s2); | |
return 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment