mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
When looking up symbols, search the objects loaded at program start
up first -- before the dlopened DAGs containing the referencing object. This makes dynamically loaded perl modules work properly again.
This commit is contained in:
parent
777d1f8281
commit
476015a33b
1 changed files with 8 additions and 8 deletions
|
|
@ -743,11 +743,9 @@ find_symdef(unsigned long symnum, Obj_Entry *refobj,
|
|||
}
|
||||
}
|
||||
|
||||
/* 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);
|
||||
/* Search all objects loaded at program start up. */
|
||||
if (def == NULL || ELF_ST_BIND(def->st_info) == STB_WEAK) {
|
||||
symp = symlook_list(name, hash, &list_main, &obj, in_plt);
|
||||
if (symp != NULL &&
|
||||
(def == NULL || ELF_ST_BIND(symp->st_info) != STB_WEAK)) {
|
||||
def = symp;
|
||||
|
|
@ -755,9 +753,11 @@ find_symdef(unsigned long symnum, Obj_Entry *refobj,
|
|||
}
|
||||
}
|
||||
|
||||
/* Search all objects loaded at program start up. */
|
||||
if (def == NULL || ELF_ST_BIND(def->st_info) == STB_WEAK) {
|
||||
symp = symlook_list(name, hash, &list_main, &obj, in_plt);
|
||||
/* 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);
|
||||
if (symp != NULL &&
|
||||
(def == NULL || ELF_ST_BIND(symp->st_info) != STB_WEAK)) {
|
||||
def = symp;
|
||||
|
|
|
|||
Loading…
Reference in a new issue