if (sym->st_value == 0 || sym->st_shndx == SHN_UNDEF)
if (sym->st_value == 0)
_dl_find_symbol(const char *name, elf_object_t *startlook,    const Elf_Sym **ref, int myself, int warnnotfound){	const Elf_Sym *weak_sym = 0;	Elf_Addr weak_offs = 0;	unsigned long h = 0;	const char *p = name;	elf_object_t *object;	while (*p) {		unsigned long g;		h = (h << 4) + *p++;		if ((g = h & 0xf0000000))			h ^= g >> 24;		h &= ~g;	}	for (object = startlook; object; object = (myself ? 0 : object->next)) {		const Elf_Sym	*symt = object->dyn.symtab;		const char	*strt = object->dyn.strtab;		long	si;		for (si = object->buckets[h % object->nbuckets];		    si != STN_UNDEF; si = object->chains[si]) {			const Elf_Sym *sym = symt + si;			if (sym->st_value == 0 ||			    sym->st_shndx == SHN_UNDEF)				continue;			if (ELF_ST_TYPE(sym->st_info) != STT_NOTYPE &&			    ELF_ST_TYPE(sym->st_info) != STT_OBJECT &&			    ELF_ST_TYPE(sym->st_info) != STT_FUNC)				continue;			if (sym != *ref &&			    _dl_strcmp(strt + sym->st_name, name))				continue;			if (ELF_ST_BIND(sym->st_info) == STB_GLOBAL) {				*ref = sym;				return(object->load_offs);			} else if (ELF_ST_BIND(sym->st_info) == STB_WEAK) {				if (!weak_sym) {					weak_sym = sym;					weak_offs = object->load_offs;				}			}		}	}	if (warnnotfound) {		if (!weak_sym && *ref &&		    ELF_ST_BIND((*ref)->st_info) != STB_WEAK) {			_dl_printf("%s: undefined symbol '%s'\n",			    _dl_progname, name);		}	}	*ref = weak_sym;	return(weak_offs);}