Add r2preload demo program

This commit is contained in:
pancake 2019-05-28 23:15:59 +02:00
parent e29ba99a07
commit 75cd2b8d2b

12
binr/preload/demo.c Normal file
View File

@ -0,0 +1,12 @@
#include <stdio.h>
#include <dlfcn.h>
int main(int argc, char **argv) {
void *a = dlopen(NULL, RTLD_LAZY);
void *m = dlsym (a, "r_main_radare2");
if (m) {
int (*r2main)(int argc, char **argv) = m;
return r2main (argc, argv);
}
return 0;
}