about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-addr.c3
-rw-r--r--elf/dl-lookup.c8
-rw-r--r--elf/get-dynamic-info.h3
3 files changed, 4 insertions, 10 deletions
diff --git a/elf/dl-addr.c b/elf/dl-addr.c
index 60073dcee6..2250617a73 100644
--- a/elf/dl-addr.c
+++ b/elf/dl-addr.c
@@ -42,8 +42,7 @@ determine_info (const ElfW(Addr) addr, struct link_map *match, Dl_info *info,
   ElfW(Word) strtabsize = match->l_info[DT_STRSZ]->d_un.d_val;
 
   const ElfW(Sym) *matchsym = NULL;
-  if (match->l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM + DT_THISPROCNUM
-		    + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM] != NULL)
+  if (match->l_info[ADDRIDX (DT_GNU_HASH)] != NULL)
     {
       /* We look at all symbol table entries referenced by the hash
 	 table.  */
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index 41dced0e19..401bc87c90 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -936,14 +936,10 @@ _dl_setup_hash (struct link_map *map)
 {
   Elf_Symndx *hash;
 
-  if (__glibc_likely (map->l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM
-				    + DT_THISPROCNUM + DT_VERSIONTAGNUM
-				    + DT_EXTRANUM + DT_VALNUM] != NULL))
+  if (__glibc_likely (map->l_info[ADDRIDX (DT_GNU_HASH)] != NULL))
     {
       Elf32_Word *hash32
-	= (void *) D_PTR (map, l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM
-				      + DT_THISPROCNUM + DT_VERSIONTAGNUM
-				      + DT_EXTRANUM + DT_VALNUM]);
+	= (void *) D_PTR (map, l_info[ADDRIDX (DT_GNU_HASH)]);
       map->l_nbuckets = *hash32++;
       Elf32_Word symbias = *hash32++;
       Elf32_Word bitmask_nwords = *hash32++;
diff --git a/elf/get-dynamic-info.h b/elf/get-dynamic-info.h
index d1bbd817be..4b1ea7c407 100644
--- a/elf/get-dynamic-info.h
+++ b/elf/get-dynamic-info.h
@@ -110,8 +110,7 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
 # endif
       ADJUST_DYN_INFO (DT_JMPREL);
       ADJUST_DYN_INFO (VERSYMIDX (DT_VERSYM));
-      ADJUST_DYN_INFO (DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM + DT_THISPROCNUM
-		       + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM);
+      ADJUST_DYN_INFO (ADDRIDX (DT_GNU_HASH));
 # undef ADJUST_DYN_INFO
       assert (cnt <= DL_RO_DYN_TEMP_CNT);
     }