about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-lookup.c1
-rw-r--r--elf/do-lookup.h12
2 files changed, 9 insertions, 4 deletions
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index 16173c9068..7646587833 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -18,6 +18,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include <alloca.h>
+#include <assert.h>
 #include <string.h>
 #include <unistd.h>
 #include <elf/ldsodefs.h>
diff --git a/elf/do-lookup.h b/elf/do-lookup.h
index 01ad29345e..147560bd32 100644
--- a/elf/do-lookup.h
+++ b/elf/do-lookup.h
@@ -99,10 +99,14 @@ FCT (const char *undef_name, unsigned long int hash,
 	      /* We need a versioned symbol but haven't found any.  If
 		 this is the object which is referenced in the verneed
 		 entry it is a bug in the library since a symbol must
-		 not simply disappear.  */
-	      if (version->filename != NULL
-		  && _dl_name_match_p (version->filename, map))
-		return -2;
+		 not simply disappear.
+
+		 It would also be a bug in the object since it means that
+		 the list of required versions is incomplete and so the
+		 tests in dl-version.c haven't found a problem.*/
+	      assert (version->filename == NULL
+		      || ! _dl_name_match_p (version->filename, map));
+
 	      /* Otherwise we accept the symbol.  */
 	    }
 	  else