diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2003-01-19 23:35:03 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2003-01-19 23:35:03 +0000 |
commit | 44d77ad874def9e5328e53a116113175fb4bd475 (patch) | |
tree | 48884ca04f5667fea4bf6e6274ea8a8c7f910d20 /gnu/usr.bin/ld | |
parent | 30c1f5f81a95e9947986b0599f4a5a8839c43771 (diff) |
give a second chance for loading dependent modules:
look in the path of the main map before giving up.
ok deraadt@.
(This fixes a few kde issues, and removes loads of needs for ldconfig)
Diffstat (limited to 'gnu/usr.bin/ld')
-rw-r--r-- | gnu/usr.bin/ld/rtld/rtld.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gnu/usr.bin/ld/rtld/rtld.c b/gnu/usr.bin/ld/rtld/rtld.c index f142296d8a9..bc7a9f64630 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.35 2003/01/19 23:33:40 espie Exp $ */ +/* $OpenBSD: rtld.c,v 1.36 2003/01/19 23:35:02 espie Exp $ */ /* $NetBSD: rtld.c,v 1.43 1996/01/14 00:35:17 pk Exp $ */ /* * Copyright (c) 1993 Paul Kranenburg @@ -623,6 +623,16 @@ again: if (ipath) remove_search_path(ipath); + if (path == NULL && smp != main_map && main_map != NULL && + !no_intern_search && + LD_PATHS(main_map->som_dynamic) != 0) { + ipath = LM_PATHS(main_map); + add_search_path(ipath); + path = rtfindlib(name, sodp->sod_major, + sodp->sod_minor, &usehints, ipath); + remove_search_path(ipath); + } + if (path == NULL) { errno = ENOENT; return NULL; |