Last active
December 26, 2015 14:59
-
-
Save Temptationx/7170016 to your computer and use it in GitHub Desktop.
dlopen, dlsym
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
#include <stdio.h> | |
#include <dlfcn.h> | |
void ppp() | |
{ | |
} | |
int main(int argc, const char * argv[]) | |
{ | |
void *h = dlopen(NULL, RTLD_NOW); | |
printf("%p\n",h); | |
printf("ppp:%p\n",ppp); | |
printf("search:%p\n",dlsym(RTLD_DEFAULT, "ppp")); | |
printf("dlopen(null):%p\n",dlsym(h, "ppp")); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment