about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/rtld.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index 9a822a8c66..88f0d6d804 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -226,8 +226,9 @@ of this helper program; chances are you did not intend to run this program.\n",
 
       /* Extract the contents of the dynamic section for easy access.  */
       elf_get_dynamic_info (l->l_ld, l->l_info);
-      /* Set up our cache of pointers into the hash table.  */
-      _dl_setup_hash (l);
+      if (l->l_info[DT_HASH])
+	/* Set up our cache of pointers into the hash table.  */
+	_dl_setup_hash (l);
 
       if (l->l_info[DT_DEBUG])
 	/* There is a DT_DEBUG entry in the dynamic section.  Fill it in