This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.27.9000-25-g6a5cac4


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  6a5cac49b6eeb60abc891f9e28908da733766630 (commit)
      from  b44e0dfbacecd0f84ebfa942e6d6c0153981680e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6a5cac49b6eeb60abc891f9e28908da733766630

commit 6a5cac49b6eeb60abc891f9e28908da733766630
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Feb 5 14:58:39 2018 -0800

    Use ADDRIDX with DT_GNU_HASH
    
    The only differences in ld.so are line numbers for asserts.
    
    Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
    
    	* elf/dl-addr.c (determine_info): Use ADDRIDX with DT_GNU_HASH.
    	* elf/dl-lookup.c (_dl_setup_hash): Likewise.
    	* elf/get-dynamic-info.h (elf_get_dynamic_info): Likewise.

diff --git a/ChangeLog b/ChangeLog
index 0509306..8c934b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2018-02-05  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* elf/dl-addr.c (determine_info): Use ADDRIDX with DT_GNU_HASH.
+	* elf/dl-lookup.c (_dl_setup_hash): Likewise.
+	* elf/get-dynamic-info.h (elf_get_dynamic_info): Likewise.
+
+2018-02-05  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* elf/elf.h (DT_SYMTAB_SHNDX): New.  Set to 34.
 	(DT_NUM): Updated to 35.
 
diff --git a/elf/dl-addr.c b/elf/dl-addr.c
index 60073dc..2250617 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 41dced0..401bc87 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 d1bbd81..4b1ea7c 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);
     }

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog              |    6 ++++++
 elf/dl-addr.c          |    3 +--
 elf/dl-lookup.c        |    8 ++------
 elf/get-dynamic-info.h |    3 +--
 4 files changed, 10 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]