warn(fn);
warn("%s", fn);
s_stab(fn, fd, ep, sp)	const char *fn;	int fd;	EXEC *ep;	struct stat *sp;{	register int cnt, len, nsymcnt;	register char *nstr, *nstrbase, *p, *strbase;	register NLIST *sym, *nsym;	u_long allocsize;	int mid;	NLIST *symbase;	/* Quit if no symbols. */	if (ep->a_syms == 0)		return 0;	if (N_SYMOFF(*ep) >= sp->st_size) {		warnx("%s: bad symbol table", fn);		return 1;	}	mid = N_GETMID(*ep);	/*	 * Initialize old and new symbol pointers.  They both point to the	 * beginning of the symbol table in memory, since we're deleting	 * entries.	 */	sym = nsym = symbase = (NLIST *)((char *)ep + N_SYMOFF(*ep));	/*	 * Allocate space for the new string table, initialize old and	 * new string pointers.  Handle the extra long at the beginning	 * of the string table.	 */	strbase = (char *)ep + N_STROFF(*ep);	allocsize = fix_long_order(*(u_long *)strbase, mid);	if ((nstrbase = malloc((u_int) allocsize)) == NULL) {		warnx("%s", strerror(ENOMEM));		return 1;	}	nstr = nstrbase + sizeof(u_long);	/*	 * Read through the symbol table.  For each non-debugging symbol,	 * copy it and save its string in the new string table.  Keep	 * track of the number of symbols.	 */	for (cnt = ep->a_syms / sizeof(NLIST); cnt--; ++sym) {		fix_nlist_order(sym, mid);		if (!(sym->n_type & N_STAB) && sym->strx) {			*nsym = *sym;			nsym->strx = nstr - nstrbase;			p = strbase + sym->strx;                        if (xflag &&                             (!(sym->n_type & N_EXT) ||                             (sym->n_type & ~N_EXT) == N_FN ||                             strcmp(p, "gcc_compiled.") == 0 ||                             strcmp(p, "gcc2_compiled.") == 0 ||                             strncmp(p, "___gnu_compiled_", 16) == 0)) {                                continue;                        }			len = strlen(p) + 1;			bcopy(p, nstr, len);			nstr += len;			fix_nlist_order(nsym++, mid);		}	}	/* Fill in new symbol table size. */	ep->a_syms = (nsym - symbase) * sizeof(NLIST);	/* Fill in the new size of the string table. */	len = nstr - nstrbase;	*(u_long *)nstrbase = fix_long_order(len, mid);	/*	 * Copy the new string table into place.  Nsym should be pointing	 * at the address past the last symbol entry.	 */	bcopy(nstrbase, (void *)nsym, len);	free(nstrbase);	/* Truncate to the current length. */	if (ftruncate(fd, (char *)nsym + len - (char *)ep)) {		warn(fn);		return 1;	}	return 0;}