about summary refs log tree commit diff
path: root/elf/nodelmod1.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-08-25 19:33:19 +0000
committerUlrich Drepper <drepper@redhat.com>2000-08-25 19:33:19 +0000
commitad7534c8f08c31f3e140a31e4099e7e0b5e193d2 (patch)
tree311f04ac9b09f2b4f5fea5aad8ab6de18e05dc38 /elf/nodelmod1.c
parentbb8d0fd5b125d43445124e37a2569f53bb7fb2ea (diff)
downloadglibc-ad7534c8f08c31f3e140a31e4099e7e0b5e193d2.tar.gz
glibc-ad7534c8f08c31f3e140a31e4099e7e0b5e193d2.tar.xz
glibc-ad7534c8f08c31f3e140a31e4099e7e0b5e193d2.zip
Update.
2000-08-25  Ulrich Drepper  <drepper@redhat.com>

	* elf/Makefile (LDFLAGS-nodelete): Add -rdynamic.
	* elf/nodelete.c (fini_ran): New global variable.
	(do_test): Before every dlclose call clear fini_ran and test
	afterwards that it is not set by the destructors.
	* elf/nodelmod1.c: Add destructor which sets fini_ran.
	* elf/nodelmod2.c: Likewise.
	* elf/nodelmod4.c: Likewise.
Diffstat (limited to 'elf/nodelmod1.c')
-rw-r--r--elf/nodelmod1.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/elf/nodelmod1.c b/elf/nodelmod1.c
index abae539a6c..fc24a7b172 100644
--- a/elf/nodelmod1.c
+++ b/elf/nodelmod1.c
@@ -1 +1,9 @@
 int var1 = 42;
+
+static void
+__attribute__ ((__destructor__))
+destr (void)
+{
+  extern int fini_ran;
+  fini_ran = 1;
+}