diff options
author | 2000-04-27 19:33:09 +0000 | |
---|---|---|
committer | 2000-04-27 19:33:09 +0000 | |
commit | 1c68d81adaa3e03d0b74028f5197329bfc13eacf (patch) | |
tree | 41faf1e72c8fda8a2317efbead1782f7bf62f57d | |
parent | Support -shared on a.out platforms: pass the right options to ld (diff) | |
download | wireguard-openbsd-1c68d81adaa3e03d0b74028f5197329bfc13eacf.tar.xz wireguard-openbsd-1c68d81adaa3e03d0b74028f5197329bfc13eacf.zip |
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.
-rw-r--r-- | gnu/usr.bin/ld/rtld/rtld.c | 5 |
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"); } } |