diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2010-06-26 22:04:52 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2010-06-26 22:04:52 +0000 |
commit | 44c5071b3b9fe8cfed2d7aa71c3a81bd106b2399 (patch) | |
tree | 8cb0cd102f37537e4818ca6555ccc67735b69549 /libexec | |
parent | 6ff3cc04b0819b7ad97cf33dc67c951090b1dd5f (diff) | |
download | FreeBSD-src-44c5071b3b9fe8cfed2d7aa71c3a81bd106b2399.zip FreeBSD-src-44c5071b3b9fe8cfed2d7aa71c3a81bd106b2399.tar.gz |
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.
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/rtld-elf/rtld.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 8082656..0e7b122 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -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)) |