FreeBSD/cddl/contrib/opensolaris/tools/ctf/cvt/output.c
/*
 * When we've found the underlying symbol's type description
 * for a weak symbol, we need to copy it and rename it to match
 * the weak symbol. We also need to add it to the td so it's
 * handled along with the others later.
 */
When we've found the underlying symbol's type description
for a weak symbol, we need to copy it and rename it to match
the weak symbol. We also need to add it to the td so it's
handled along with the others later.
When we ' ve found the underlying symbol ' s type description for a weak symbol we need to copy it and rename it to match the weak symbol . We also need to add it to the td so it ' s handled along with the others later .
static iidesc_t *
copy_from_strong(tdata_t *td, GElf_Sym *sym, iidesc_t *strongdesc,
    const char *weakname, const char *weakfile)
{
	iidesc_t *new = iidesc_dup_rename(strongdesc, weakname, weakfile);
	uchar_t type = GELF_ST_TYPE(sym->st_info);
	switch (type) {
	case STT_OBJECT:
		new->ii_type = II_GVAR;
		break;
	case STT_FUNC:
		new->ii_type = II_GFUN;
		break;
	}
	hash_add(td->td_iihash, new);
	return (new);
}
static iidesc_t * copy_from_strong ( tdata_t * td , GElf_Sym * sym , iidesc_t * strongdesc , const char * weakname , const char * weakfile ) { iidesc_t * new = iidesc_dup_rename ( strongdesc , weakname , weakfile ) ; uchar_t type = GELF_ST_TYPE ( sym -> st_info ) ; switch ( type ) { case STT_OBJECT : new -> ii_type = II_GVAR ; break ; case STT_FUNC : new -> ii_type = II_GFUN ; break ; } hash_add ( td -> td_iihash , new ) ; return ( new ) ; }
When we've found the underlying symbol's type description
 for a weak symbol, we need to copy it and rename it to match
 the weak symbol.
When we ' ve found the underlying symbol ' s type description for a weak symbol we need to copy it and rename it to match the weak symbol .