summaryrefslogtreecommitdiff
path: root/test/dlopen/nodelmod1.c
diff options
context:
space:
mode:
authorLeonid Lisovskiy <lly.dev@gmail.com>2016-01-13 21:00:05 +0300
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-01-31 17:39:37 +0100
commit27f1b2c66c67e601dd619a1def70a8fd7ca5eeba (patch)
tree90a57981936937d51fa6dab56026f5f7c8bfcc80 /test/dlopen/nodelmod1.c
parent12a85731dc5fda3bc01ab19c82678b3bf122d794 (diff)
libdl: dlopen() mustn't forget RTLD_NODELETE flag
If RTLD_NODELETE is passed to dlopen() rather than set on shared library itself, flag propagation to rtld_flags is missed. Test-case taken from glibc. Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
Diffstat (limited to 'test/dlopen/nodelmod1.c')
-rw-r--r--test/dlopen/nodelmod1.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/dlopen/nodelmod1.c b/test/dlopen/nodelmod1.c
new file mode 100644
index 000000000..51be080af
--- /dev/null
+++ b/test/dlopen/nodelmod1.c
@@ -0,0 +1,10 @@
+extern int fini_ran;
+
+int var1 = 42;
+
+static void
+__attribute__ ((__destructor__))
+destr (void)
+{
+ fini_ran = 1;
+}