summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/ld
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2000-04-27 19:33:10 +0000
committerMarc Espie <espie@cvs.openbsd.org>2000-04-27 19:33:10 +0000
commiteb0f55356f7ef7d9a7137c403f545f225bd53172 (patch)
tree976b710bcb4939ba2392781046ccc7224b0476d2 /gnu/usr.bin/ld
parented7200230860c1df27843f9017282d0a2ccea9b8 (diff)
Call ctor/dtor lists generated by collect2 as well.
Since those are properly protected against multiple execution, even if collect2/ld manages to link them at some point, this won't add problems.
Diffstat (limited to 'gnu/usr.bin/ld')
-rw-r--r--gnu/usr.bin/ld/rtld/rtld.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gnu/usr.bin/ld/rtld/rtld.c b/gnu/usr.bin/ld/rtld/rtld.c
index 2485ffec926..d40e1511349 100644
--- a/gnu/usr.bin/ld/rtld/rtld.c
+++ b/gnu/usr.bin/ld/rtld/rtld.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld.c,v 1.17 2000/04/24 17:56:34 niklas Exp $ */
+/* $OpenBSD: rtld.c,v 1.18 2000/04/27 19:33:09 espie Exp $ */
/* $NetBSD: rtld.c,v 1.43 1996/01/14 00:35:17 pk Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -717,6 +717,7 @@ init_maps(head)
continue;
call_map(smp, ".init");
call_map(smp, "__init");
+ call_map(smp, "__GLOBAL__DI");
}
}
@@ -1563,6 +1564,7 @@ xprintf("dlclose(%s): refcount = %d\n", smp->som_path, LM_PRIVATE(smp)->spd_refc
/* Dismantle shared object map and descriptor */
call_map(smp, "__fini");
+ call_map(smp, "__GLOBAL__DD");
#if 0
unload_subs(smp); /* XXX should unload implied objects */
#endif
@@ -1627,6 +1629,7 @@ __dlexit()
if (LM_PRIVATE(smp)->spd_flags & RTLD_RTLD)
continue;
call_map(smp, ".fini");
+ call_map(smp, "__GLOBAL__DD");
}
}