diff options
Diffstat (limited to 'languages/cpp/debugger/tests/dll/main.cpp')
-rw-r--r-- | languages/cpp/debugger/tests/dll/main.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/languages/cpp/debugger/tests/dll/main.cpp b/languages/cpp/debugger/tests/dll/main.cpp new file mode 100644 index 00000000..ee91d5a2 --- /dev/null +++ b/languages/cpp/debugger/tests/dll/main.cpp @@ -0,0 +1,15 @@ +#include <dlfcn.h> + +typedef int (*ft)(int); + +int main() +{ + void* handle = dlopen("./libhelper.so", RTLD_LAZY); + void* sym = dlsym(handle, "helper"); + + ft f = (ft)sym; + + f(10); + f(15); + return 0; +} |