1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-26 07:55:01 +00:00

Ignore versioned dependencies on shared objects to which we do not link.

This fixes an error with files like this created by GNU ld under certain
circumstances.
This commit is contained in:
Nathan Whitehorn 2010-06-26 22:04:52 +00:00
parent 3297cdd096
commit 5540acc1ba
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=209544

View File

@ -3443,9 +3443,13 @@ locate_dependency(const Obj_Entry *obj, const char *name)
if (object_match_name(needed->obj, name))
return needed->obj;
}
_rtld_error("%s: Unexpected inconsistency: dependency %s not found",
obj->path, name);
die();
/*
* 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;
}
static int
@ -3567,6 +3571,9 @@ 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))