diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2026-04-16 23:07:43 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2026-04-20 17:25:20 +0000 |
| commit | 9b844b495e8e63439ffe523757ac7444a16317af (patch) | |
| tree | 82ef85c1b9b039081f0bae322d9f5ebbba653c4b | |
| parent | 4b79ee8eb139696c1fe845d25a56439d02ab4131 (diff) | |
rtld: fix processing of preloaded z_initfirst objects
After we found some preloaded z_initfirst object, we must process till
the end of the preload list still, not stopping on the first found
object.
Reported by: des
Reviewed by: des, markj, siderop1@netapp.com
Fixes: 78aaab9f1cf359f3b7325e4369653f6b50593393
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D56466
| -rw-r--r-- | libexec/rtld-elf/rtld.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index e3f5aa5be9b4..29984e40b574 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -2654,6 +2654,11 @@ initlist_add_objects(Obj_Entry *obj, Obj_Entry *tail, Objlist *list, initlist_add_neededs(obj->needed_aux_filtees, NULL, iflist); objlist_push_tail(iflist, obj); + + /* Recursively process the successor objects. */ + nobj = globallist_next(obj); + if (nobj != NULL && obj != tail) + initlist_add_objects(nobj, tail, list, iflist); } else { if (obj->init_scanned) return; |
