diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2023-07-14 13:38:03 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2023-07-16 12:34:34 +0000 |
| commit | 1005d3d05362de368b1ea7aeb8eb20cee993e122 (patch) | |
| tree | 0c15e41f1e5317175e03110a293024fc1bf0d229 /libexec | |
| parent | ad056b5d35d9957b1bd023abeb6461601449b725 (diff) | |
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/rtld-elf/rtld.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 5c96405be62c..83315d5023ba 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -3714,7 +3714,6 @@ static Obj_Entry * dlopen_object(const char *name, int fd, Obj_Entry *refobj, int lo_flags, int mode, RtldLockState *lockstate) { - Obj_Entry *old_obj_tail; Obj_Entry *obj; Objlist initlist; RtldLockState mlockstate; @@ -3731,7 +3730,6 @@ dlopen_object(const char *name, int fd, Obj_Entry *refobj, int lo_flags, } GDB_STATE(RT_ADD,NULL); - old_obj_tail = globallist_curr(TAILQ_LAST(&obj_list, obj_entry_q)); obj = NULL; if (name == NULL && fd == -1) { obj = obj_main; @@ -3744,9 +3742,9 @@ dlopen_object(const char *name, int fd, Obj_Entry *refobj, int lo_flags, obj->dl_refcount++; if (mode & RTLD_GLOBAL && objlist_find(&list_global, obj) == NULL) objlist_push_tail(&list_global, obj); - if (globallist_next(old_obj_tail) != NULL) { - /* We loaded something new. */ - assert(globallist_next(old_obj_tail) == obj); + + if (!obj->init_done) { + /* We loaded something new and have to init something. */ if ((lo_flags & RTLD_LO_DEEPBIND) != 0) obj->symbolic = true; result = 0; |
