am 06713930: Merge "Small cleanup of soinfo_elf_lookup."

* commit '0671393072a78e75a726c58aa3ca718e55eeac3e':
  Small cleanup of soinfo_elf_lookup.
This commit is contained in:
Brian Carlstrom 2013-06-03 20:21:04 -07:00 committed by Android Git Automerger
commit 81bfade818

View file

@ -440,17 +440,14 @@ dl_iterate_phdr(int (*cb)(dl_phdr_info *info, size_t size, void *data),
#endif
static Elf32_Sym* soinfo_elf_lookup(soinfo* si, unsigned hash, const char* name) {
Elf32_Sym* s;
Elf32_Sym* symtab = si->symtab;
const char* strtab = si->strtab;
unsigned n;
TRACE_TYPE(LOOKUP, "SEARCH %s in %s@0x%08x %08x %d",
name, si->name, si->base, hash, hash % si->nbucket);
n = hash % si->nbucket;
for (n = si->bucket[hash % si->nbucket]; n != 0; n = si->chain[n]) {
s = symtab + n;
for (unsigned n = si->bucket[hash % si->nbucket]; n != 0; n = si->chain[n]) {
Elf32_Sym* s = symtab + n;
if (strcmp(strtab + s->st_name, name)) continue;
/* only concern ourselves with global and weak symbol definitions */