summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2004-05-26 19:14:15 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2004-05-26 19:14:15 +0000
commit260edef4094b632d23585c48758a3de9fad3d4ed (patch)
treeaa5ae087c98abe887859f2e916d33425ad049708
parentff29469fca330b41980c40fcad9f5fdaeba68bd9 (diff)
call ctors after debugging has been setup; drahn@ ok
-rw-r--r--libexec/ld.so/loader.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/libexec/ld.so/loader.c b/libexec/ld.so/loader.c
index 0ae5055c725..155b078a5e1 100644
--- a/libexec/ld.so/loader.c
+++ b/libexec/ld.so/loader.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: loader.c,v 1.79 2004/05/25 21:48:00 mickey Exp $ */
+/* $OpenBSD: loader.c,v 1.80 2004/05/26 19:14:14 mickey Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -361,18 +361,6 @@ _dl_boot(const char **argv, char **envp, const long loff, long *dl_data)
_dl_fixup_user_env();
/*
- * The first object is the executable itself,
- * it is responsible for running it's own ctors/dtors
- * thus do NOT run the ctors for the executable, all of
- * the shared libraries which follow.
- * Do not run init code if run from ldd.
- */
- if (_dl_objects->next != NULL) {
- _dl_objects->status |= STAT_INIT_DONE;
- _dl_call_init(_dl_objects);
- }
-
- /*
* Finally make something to help gdb when poking around in the code.
*/
#ifdef __mips__
@@ -403,6 +391,18 @@ _dl_boot(const char **argv, char **envp, const long loff, long *dl_data)
_dl_debug_state();
/*
+ * The first object is the executable itself,
+ * it is responsible for running it's own ctors/dtors
+ * thus do NOT run the ctors for the executable, all of
+ * the shared libraries which follow.
+ * Do not run init code if run from ldd.
+ */
+ if (_dl_objects->next != NULL) {
+ _dl_objects->status |= STAT_INIT_DONE;
+ _dl_call_init(_dl_objects);
+ }
+
+ /*
* Schedule a routine to be run at shutdown, by using atexit.
* Cannot call atexit directly from ld.so?
* Do not schedule destructors if run from ldd.