In article <20260210060331.08706F986%cvs.NetBSD.org@localhost>,
Nick Hudson <source-changes-d%NetBSD.org@localhost> wrote:
-=-=-=-=-=-
static void
+_rtld_call_preinit_functions(sigset_t *mask)
+{
+#ifdef HAVE_INITFINI_ARRAY
+ Obj_Entry *obj = _rtld_objmain;
+
+ /*
+ * Process the init_array if it exists. Simply go from start
+ * to end.
+ */
+ while (obj->preinit_arraysz > 0) {
+ fptr_t preinit = *obj->preinit_array++;
+ obj->preinit_arraysz--;
+ dbg (("calling preinit_array function %s at %p",
+ obj->path, (void *)preinit));
+ _rtld_call_initfini_function(preinit, mask);
+ }
+#endif /* HAVE_INITFINI_ARRAY */
I thought that you were going to fix this so that iterating does
not alter the object's array/arraysz values, like FreeBSDs doesn't?