diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-08-31 06:51:54 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-08-31 06:51:54 +0000 |
commit | 9a927b3cbb4b309f01de9473e5aad69f41df1d9a (patch) | |
tree | 6e036157779d5b9a24bcca42f994028826736e6a /ldso/ldso/ldso.c | |
parent | 1e680eeea6df1fb580163689bfc9edb547f5daab (diff) |
Weed out duplicates before trying to load libraries.... Delayed
checking for duplicates and returning an alias if an existing lib
is already loaded is still correct for the dlopen case.
Diffstat (limited to 'ldso/ldso/ldso.c')
-rw-r--r-- | ldso/ldso/ldso.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c index 2f8e611ba..b6f236d0b 100644 --- a/ldso/ldso/ldso.c +++ b/ldso/ldso/ldso.c @@ -902,6 +902,10 @@ static void _dl_get_ready_to_run(struct elf_resolve *tpnt, struct elf_resolve *a *str2 = '\0'; if (!_dl_secure || _dl_strchr(str, '/') == NULL) { + if ((tpnt1 = _dl_check_if_named_library_is_loaded(str))) + { + continue; + } tpnt1 = _dl_load_shared_library(_dl_secure, &rpnt, NULL, str); if (!tpnt1) { #ifdef __LDSO_LDD_SUPPORT__ @@ -978,6 +982,10 @@ static void _dl_get_ready_to_run(struct elf_resolve *tpnt, struct elf_resolve *a c = *cp; *cp = '\0'; + if ((tpnt1 = _dl_check_if_named_library_is_loaded(cp2))) + { + continue; + } tpnt1 = _dl_load_shared_library(0, &rpnt, NULL, cp2); if (!tpnt1) { #ifdef __LDSO_LDD_SUPPORT__ @@ -1068,6 +1076,10 @@ static void _dl_get_ready_to_run(struct elf_resolve *tpnt, struct elf_resolve *a tpnt = NULL; continue; } + if ((tpnt1 = _dl_check_if_named_library_is_loaded(lpntstr))) + { + continue; + } if (!(tpnt1 = _dl_load_shared_library(0, &rpnt, tcurr, lpntstr))) { #ifdef __LDSO_LDD_SUPPORT__ |