Change the symbol lookup order to search RTLD_GLOBAL objects
before referencing object's DAG. This makes it possible for C++ exceptions to work across shared libraries and brings us closer to the search order used by Solaris/Linux. Reviewed by: jdp Approved by: obrien MFC after: 1 month
This commit is contained in:
parent
d7dd6ae7ec
commit
b2ce513208
@ -1922,8 +1922,8 @@ symlook_default(const char *name, unsigned long hash,
|
||||
}
|
||||
}
|
||||
|
||||
/* Search all dlopened DAGs containing the referencing object. */
|
||||
STAILQ_FOREACH(elm, &refobj->dldags, link) {
|
||||
/* 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,
|
||||
@ -1935,8 +1935,8 @@ symlook_default(const char *name, unsigned long hash,
|
||||
}
|
||||
}
|
||||
|
||||
/* Search all DAGs whose roots are RTLD_GLOBAL objects. */
|
||||
STAILQ_FOREACH(elm, &list_global, link) {
|
||||
/* Search all dlopened DAGs containing the referencing object. */
|
||||
STAILQ_FOREACH(elm, &refobj->dldags, link) {
|
||||
if (def != NULL && ELF_ST_BIND(def->st_info) != STB_WEAK)
|
||||
break;
|
||||
symp = symlook_list(name, hash, &elm->obj->dagmembers, &obj, in_plt,
|
||||
|
Loading…
Reference in New Issue
Block a user