aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rtld-elf/rtld.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index a007ff5c1d1b..d7f243ac8e52 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -1605,11 +1605,8 @@ dlopen(const char *name, int mode)
assert(*old_obj_tail == obj);
result = load_needed_objects(obj);
- if (result != -1 && ld_tracing) {
- trace_loaded_objects(obj);
- wlock_release();
- exit(0);
- }
+ if (result != -1 && ld_tracing)
+ goto trace;
if (result == -1 ||
(init_dag(obj), relocate_objects(obj, mode == RTLD_NOW,
@@ -1623,7 +1620,8 @@ dlopen(const char *name, int mode)
/* Make list of init functions to call. */
initlist_add_objects(obj, &obj->next, &initlist);
}
- }
+ } else if (ld_tracing)
+ goto trace;
}
GDB_STATE(RT_CONSISTENT,obj ? &obj->linkmap : NULL);
@@ -1635,6 +1633,10 @@ dlopen(const char *name, int mode)
objlist_clear(&initlist);
wlock_release();
return obj;
+trace:
+ trace_loaded_objects(obj);
+ wlock_release();
+ exit(0);
}
void *