+static void
+init_maps()
+{
+ struct link_map *lmp, *src_map;
+ struct nzlist *np;
+ void (*func)();
+
+ for (lmp = link_map_head; lmp; lmp = lmp->lm_next) {
+ src_map = lmp;
+ np = lookup("___init", &src_map, 1);
+#if DEBUG
+if (np)
+xprintf("Calling __init in %s at %#x\n", src_map->lm_name, np->nz_value+src_map->lm_addr);
+#endif
+ if (np) {
+ func = (void (*)())(src_map->lm_addr + np->nz_value);
+ (*func)();
+ }
+ }
+}
+