#define _GNU_SOURCE #include #include #include #include int (*ropen)(const char *pathname, int flags, mode_t mode); int open_shlib(void){ ropen = dlsym(RTLD_NEXT,"open"); return 0; } int open(const char *pathname, int flags, mode_t mode){ printf("%s\n",pathname); return ropen(pathname, flags, mode); }