+ m->naliases = naliases;
+ if (naliases == 0)
+ m->aliases = NULL;
+ else {
+ char *ptr = (char *)_aliases + naliases * sizeof(_aliases[0]);
+ int len;
+
+ i = 0;
+ do {
+ len = strlen(aliases[i]) + 1;
+ memcpy(ptr, aliases[i], len);
+ _aliases[i] = ptr;
+ ptr += len;
+ i++;
+ } while (i < naliases);
+ m->aliases = _aliases;
+ }
+
+ m->refcnt = 0;
+ alloc_module_node(m->name, m, false);
+ for (i = 0; i < m->naliases; i++)
+ alloc_module_node(m->aliases[i], m, true);