about summary refs log tree commit diff
path: root/elf/dl-reloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-reloc.c')
-rw-r--r--elf/dl-reloc.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index 4349dc27fb..4004316c5a 100644
--- a/elf/dl-reloc.c
+++ b/elf/dl-reloc.c
@@ -213,13 +213,15 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
 	     int _tc = elf_machine_type_class (r_type);			      \
 	     l->l_lookup_cache.type_class = _tc;			      \
 	     l->l_lookup_cache.sym = (*ref);				      \
-	     _lr = ((version) != NULL && (version)->hash != 0		      \
-		    ? _dl_lookup_versioned_symbol (strtab + (*ref)->st_name,  \
-						   l, (ref), scope, (version),\
-						   _tc, 0)		      \
-		    : _dl_lookup_symbol (strtab + (*ref)->st_name, l, (ref),  \
-					 scope, _tc,			      \
-					 DL_LOOKUP_ADD_DEPENDENCY));	      \
+	     const struct r_found_version *v = NULL;			      \
+	     int flags = DL_LOOKUP_ADD_DEPENDENCY;			      \
+	     if ((version) != NULL && (version)->hash != 0)		      \
+	       {							      \
+		 v = (version);						      \
+		 flags = 0;						      \
+	       }							      \
+	     _lr = _dl_lookup_symbol_x (strtab + (*ref)->st_name, l, (ref),   \
+					scope, v, _tc, flags, NULL);	      \
 	     l->l_lookup_cache.ret = (*ref);				      \
 	     l->l_lookup_cache.value = _lr; }))				      \
      : l)
@@ -234,13 +236,15 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
 	     int _tc = elf_machine_type_class (r_type);			      \
 	     l->l_lookup_cache.type_class = _tc;			      \
 	     l->l_lookup_cache.sym = (*ref);				      \
-	     _lr = ((version) != NULL && (version)->hash != 0		      \
-		    ? _dl_lookup_versioned_symbol (strtab + (*ref)->st_name,  \
-						   l, (ref), scope,	      \
-						   (version), _tc, 0)	      \
-		    : _dl_lookup_symbol (strtab + (*ref)->st_name, l, (ref),  \
-					 scope, _tc,			      \
-					 DL_LOOKUP_ADD_DEPENDENCY));	      \
+	     const struct r_found_version *v = NULL;			      \
+	     int flags = DL_LOOKUP_ADD_DEPENDENCY;			      \
+	     if ((version) != NULL && (version)->hash != 0)		      \
+	       {							      \
+		 v = (version);						      \
+		 flags = 0;						      \
+	       }							      \
+	     _lr = _dl_lookup_symbol_x (strtab + (*ref)->st_name, l, (ref),   \
+					scope, v, _tc, flags, NULL);	      \
 	     l->l_lookup_cache.ret = (*ref);				      \
 	     l->l_lookup_cache.value = _lr; }))				      \
      : l->l_addr)