if (addr == 0) main_map = smp;
alloc_link_map(path, sodp, parent, addr, size, dp)	char		*path;	struct sod	*sodp;	struct so_map	*parent;	caddr_t		addr;	size_t		size;	struct _dynamic	*dp;{	struct so_map		*smp;	struct somap_private	*smpp;	smpp = (struct somap_private *)xmalloc(sizeof(struct somap_private));	smp = (struct so_map *)xmalloc(sizeof(struct so_map));	smp->som_next = NULL;	*link_map_tail = smp;	link_map_tail = &smp->som_next;	/*smp->som_sodbase = 0; NOT USED */	smp->som_write = 0;	smp->som_addr = addr;	smp->som_path = path?strdup(path):NULL;	smp->som_sod = sodp;	smp->som_dynamic = dp;	smp->som_spd = (caddr_t)smpp;/*XXX*/	if (addr == 0) main_map = smp;	smpp->spd_refcount = 0;	smpp->spd_flags = 0;	smpp->spd_parent = parent;	smpp->spd_size = size;#ifdef SUN_COMPAT	smpp->spd_offset =		(addr==0 && dp && dp->d_version==LD_VERSION_SUN) ? PAGSIZ : 0;#endif	return smp;}