rtld: pass argc/argv/env to dso inits.

This is consistent with how array inits are called, and also makes us
more compatible with glibc environment.

Requested by:	Alex S <iwtcex@gmail.com>
PR:	249162
Reviewed by:	dim, emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D26351
This commit is contained in:
Konstantin Belousov 2020-09-07 21:32:27 +00:00
parent 3d4217bc0f
commit 1db23efb83

View File

@ -2844,7 +2844,7 @@ objlist_call_init(Objlist *list, RtldLockState *lockstate)
(void *)elm->obj->init);
LD_UTRACE(UTRACE_INIT_CALL, elm->obj, (void *)elm->obj->init,
0, 0, elm->obj->path);
call_initfini_pointer(elm->obj, elm->obj->init);
call_init_pointer(elm->obj, elm->obj->init);
}
init_addr = (Elf_Addr *)elm->obj->init_array;
if (init_addr != NULL) {