From 1db23efb83cbdbf7ab49f496843d7a26228cc479 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Mon, 7 Sep 2020 21:32:27 +0000 Subject: [PATCH] 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 PR: 249162 Reviewed by: dim, emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D26351 --- libexec/rtld-elf/rtld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index c56aa9fa513..2f0fc9f10a6 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -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) {