diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2003-01-19 23:28:47 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2003-01-19 23:28:47 +0000 |
commit | cb308e99ddfd3f58b05ce78537a928844a7c29d1 (patch) | |
tree | cb5ae46317b84c204d28d5ba959dc62a899c52fc /gnu/usr.bin/ld/rtld | |
parent | 764871b7296e30d652b9dce420a80727f8936c65 (diff) |
In error message from dependent libraries, mention which dependent library
is trying to load another library.
Diffstat (limited to 'gnu/usr.bin/ld/rtld')
-rw-r--r-- | gnu/usr.bin/ld/rtld/rtld.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/gnu/usr.bin/ld/rtld/rtld.c b/gnu/usr.bin/ld/rtld/rtld.c index 60525516de8..de27cbf37c8 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.33 2003/01/05 09:04:10 pvalchev Exp $ */ +/* $OpenBSD: rtld.c,v 1.34 2003/01/19 23:28:46 espie Exp $ */ /* $NetBSD: rtld.c,v 1.43 1996/01/14 00:35:17 pk Exp $ */ /* * Copyright (c) 1993 Paul Kranenburg @@ -380,13 +380,30 @@ load_subs(struct so_map *smp) if ((newmap = map_object(sodp, smp)) == NULL) { if (!ld_tracing) { - char *fmt = sodp->sod_library ? - "%s: lib%s.so.%d.%d" : - "%s: %s"; - err(1, fmt, main_progname, + if (smp != main_map) + if (sodp->sod_library) + err(1, "%s(%s): lib%s.so.%d.%d", + main_progname, + smp->som_path, sodp->sod_name+LM_LDBASE(smp), sodp->sod_major, sodp->sod_minor); + else + err(1, "%s(%s): %s", + main_progname, + smp->som_path, + sodp->sod_name+LM_LDBASE(smp)); + else + if (sodp->sod_library) + err(1, "%s: lib%s.so.%d.%d", + main_progname, + sodp->sod_name+LM_LDBASE(smp), + sodp->sod_major, + sodp->sod_minor); + else + err(1, "%s: %s", + main_progname, + sodp->sod_name+LM_LDBASE(smp)); } newmap = alloc_link_map(NULL, sodp, smp, 0, 0, 0); |