12 lines
209 B
C
12 lines
209 B
C
|
#include <dlfcn.h>
|
||
|
#include <stdio.h>
|
||
|
#include <unistd.h>
|
||
|
|
||
|
int num = 5;
|
||
|
|
||
|
int main() {
|
||
|
void* handle = dlopen("./test.so", RTLD_LAZY);
|
||
|
void (*handle_func)() = dlsym(handle, "test");
|
||
|
handle_func();
|
||
|
}
|