From d0ab6abbf5318fa09df1b145198d543c60f0685b Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Sat, 19 Apr 2025 13:26:58 +0300 Subject: [PATCH] rtld: symbolic and deepbind are equivalent for the refobj Reported by: avg Sponsored by: The FreeBSD Foundation MFC after: 1 week --- libexec/rtld-elf/rtld.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 13b24a259be..fa96a516687 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -4677,12 +4677,13 @@ symlook_default(SymLook *req, const Obj_Entry *refobj) */ res = symlook_obj(&req1, refobj); if (res == 0 && (refobj->symbolic || - ELF_ST_VISIBILITY(req1.sym_out->st_other) == STV_PROTECTED)) { + ELF_ST_VISIBILITY(req1.sym_out->st_other) == STV_PROTECTED || + refobj->deepbind)) { req->sym_out = req1.sym_out; req->defobj_out = req1.defobj_out; assert(req->defobj_out != NULL); } - if (refobj->symbolic || req->defobj_out != NULL) + if (refobj->symbolic || req->defobj_out != NULL || refobj->deepbind) donelist_check(&donelist, refobj); if (!refobj->deepbind)