diff options
author | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2003-02-18 18:43:28 +0000 |
---|---|---|
committer | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2003-02-18 18:43:28 +0000 |
commit | 4b7feaf574461932fa0255a1cb6454d2afba760c (patch) | |
tree | e48a3332d51ff702f50c37be197efb7fc3fa0d0b /mdk-stage1/dietlibc/libdl/test/test.c | |
parent | f40d43ad1a8690cf3ad71a7e4e81f6a3312c3e3c (diff) | |
download | drakx-4b7feaf574461932fa0255a1cb6454d2afba760c.tar drakx-4b7feaf574461932fa0255a1cb6454d2afba760c.tar.gz drakx-4b7feaf574461932fa0255a1cb6454d2afba760c.tar.bz2 drakx-4b7feaf574461932fa0255a1cb6454d2afba760c.tar.xz drakx-4b7feaf574461932fa0255a1cb6454d2afba760c.zip |
Add missing files, remove extra files/dirs (dynlinker)
Diffstat (limited to 'mdk-stage1/dietlibc/libdl/test/test.c')
-rw-r--r-- | mdk-stage1/dietlibc/libdl/test/test.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mdk-stage1/dietlibc/libdl/test/test.c b/mdk-stage1/dietlibc/libdl/test/test.c new file mode 100644 index 000000000..d467134ba --- /dev/null +++ b/mdk-stage1/dietlibc/libdl/test/test.c @@ -0,0 +1,20 @@ +#include <dlfcn.h> + +int main(int argc, char **argv) +{ + void *Hlib; + +// if (Hlib=dlopen("libtest.so", RTLD_LAZY)) { + if (Hlib=dlopen("libtest.so", RTLD_NOW)) { + void (*t)(void) = dlsym(Hlib,"test"); + if (t) { + printf("test @ %08lx\n",(long)t); + t(); + } + dlclose(Hlib); + } + else { + printf("%s\n",dlerror()); + } + return 0; +} |