From e50f2a53d718bc3a55162745ffb20464f16601b2 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 21 Jul 2011 16:12:21 +0200 Subject: add libtest.c Signed-off-by: Florian Pritz --- libtest.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 libtest.c (limited to 'libtest.c') diff --git a/libtest.c b/libtest.c new file mode 100644 index 0000000..1d00b80 --- /dev/null +++ b/libtest.c @@ -0,0 +1,18 @@ +// compile with gcc -ldl -o libtest libtest.c + +#include +#include +#include + +int main(int argc, char const* argv[]) +{ + void *handle; + + handle = dlopen(argv[1], RTLD_NOW); + if(!handle) { + fprintf(stderr, "%s\n", dlerror()); + return 1; + } + dlclose(handle); + return 0; +} -- cgit v1.2.3-24-g4f1b