diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 0e7b122f4f3d..8082656657df 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -3443,13 +3443,9 @@ locate_dependency(const Obj_Entry *obj, const char *name) if (object_match_name(needed->obj, name)) return needed->obj; } - - /* - * GNU LD sometimes refers to version dependencies on objects to which - * it does not actually link. Treat this as a non-fatal error, and - * ignore this dependency. - */ - return NULL; + _rtld_error("%s: Unexpected inconsistency: dependency %s not found", + obj->path, name); + die(); } static int @@ -3571,9 +3567,6 @@ rtld_verify_object_versions(Obj_Entry *obj) vn = obj->verneed; while (vn != NULL) { depobj = locate_dependency(obj, obj->strtab + vn->vn_file); - if (depobj == NULL) - break; - vna = (const Elf_Vernaux *) ((char *)vn + vn->vn_aux); for (;;) { if (check_object_provided_version(obj, depobj, vna))