@@ -31,21 +31,17 @@ __attribute ((always_inline))
find_needed (const char *name, struct link_map *map)
{
struct link_map *tmap;
- unsigned int n;
for (tmap = GL(dl_ns)[map->l_ns]._ns_loaded; tmap != NULL;
tmap = tmap->l_next)
if (_dl_name_match_p (name, tmap))
return tmap;
- /* The required object is not in the global scope, look to see if it is
- a dependency of the current object. */
- for (n = 0; n < map->l_searchlist.r_nlist; n++)
- if (_dl_name_match_p (name, map->l_searchlist.r_list[n]))
- return map->l_searchlist.r_list[n];
-
- /* Should never happen. */
- return NULL;
+ struct dl_exception exception;
+ _dl_exception_create_format
+ (&exception, DSO_FILENAME (map->l_name),
+ "missing soname %s in version dependency", name);
+ _dl_signal_exception (0, &exception, NULL);
}
@@ -199,10 +195,6 @@ _dl_check_map_versions (struct link_map *map, int verbose, int trace_mode)
ElfW(Vernaux) *aux;
struct link_map *needed = find_needed (strtab + ent->vn_file, map);
- /* If NEEDED is NULL this means a dependency was not found
- and no stub entry was created. This should never happen. */
- assert (needed != NULL);
-
/* Make sure this is no stub we created because of a missing
dependency. */
if (__builtin_expect (! trace_mode, 1)