summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2002-02-27 23:44:50 +0000
committerdes <des@FreeBSD.org>2002-02-27 23:44:50 +0000
commit78adc01edf32eb7d973783bf4c696febbabf4b45 (patch)
tree952e993d0788770ea7add3bc87e2709ac5298368 /libexec
parent658decccecd650044f7c4a5a6ddd4563fb0f0a90 (diff)
downloadFreeBSD-src-78adc01edf32eb7d973783bf4c696febbabf4b45.zip
FreeBSD-src-78adc01edf32eb7d973783bf4c696febbabf4b45.tar.gz
When searching an object that was opened with RTLD_GLOBAL, search its DAG too.
PR: bin/25059 Approved by: jdp MFC after: 3 weeks
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rtld-elf/rtld.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index abc95e8..619791e 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -1915,9 +1915,12 @@ symlook_default(const char *name, unsigned long hash,
}
}
- /* Search all RTLD_GLOBAL objects. */
- if (def == NULL || ELF_ST_BIND(def->st_info) == STB_WEAK) {
- symp = symlook_list(name, hash, &list_global, &obj, in_plt, &donelist);
+ /* Search all DAGs whose roots are RTLD_GLOBAL objects. */
+ STAILQ_FOREACH(elm, &list_global, link) {
+ if (def != NULL && ELF_ST_BIND(def->st_info) != STB_WEAK)
+ break;
+ symp = symlook_list(name, hash, &elm->obj->dagmembers, &obj, in_plt,
+ &donelist);
if (symp != NULL &&
(def == NULL || ELF_ST_BIND(symp->st_info) != STB_WEAK)) {
def = symp;
OpenPOWER on IntegriCloud