summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-09-28 20:14:36 +0000
committerMike Frysinger <vapier@gentoo.org>2007-09-28 20:14:36 +0000
commiteb0847057d25cffba97cf04f60b8df54bf175dd9 (patch)
tree81474921723a0d0c03b9bcb897fa66396cee2ddd
parent2435be015f6d4cdc8c93dcf621c80cb5ed1b03bc (diff)
Make sure that the DSO has an hash table into its elf, otherwise skip
the lookup over next DSO. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
-rw-r--r--ldso/ldso/dl-hash.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ldso/ldso/dl-hash.c b/ldso/ldso/dl-hash.c
index f44d0ec89..2043c2504 100644
--- a/ldso/ldso/dl-hash.c
+++ b/ldso/ldso/dl-hash.c
@@ -161,6 +161,10 @@ char *_dl_find_hash(const char *name, struct dyn_elf *rpnt, struct elf_resolve *
if ((type_class & ELF_RTYPE_CLASS_COPY) && tpnt->libtype == elf_executable)
continue;
+ /* If the hash table is empty there is nothing to do here. */
+ if (tpnt->nbucket == 0)
+ continue;
+
/* Avoid calling .urem here. */
do_rem(hn, elf_hash_number, tpnt->nbucket);
symtab = (ElfW(Sym) *) tpnt->dynamic_info[DT_SYMTAB];