/* mylib.c */ // gcc -c -fpic mylib.c // gcc -shared -o mylib.so mylib.o #include #include static void *strptr = NULL; extern char *my_strdup(const char *src) { strptr = (void *)strdup(src); return (char *)strptr; } extern void my_free() { free(strptr); }