summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf/rtld.c
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2010-06-28 01:40:56 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2010-06-28 01:40:56 +0000
commit97828e73ee380bd8ad98df3636aca2dda7c7f98d (patch)
tree9d902d210b4568952a17cbd4964d6d9fa42cd1ca /libexec/rtld-elf/rtld.c
parent7ebad3c8f2b05383c8ac36aa68ffa3868e179eba (diff)
downloadFreeBSD-src-97828e73ee380bd8ad98df3636aca2dda7c7f98d.zip
FreeBSD-src-97828e73ee380bd8ad98df3636aca2dda7c7f98d.tar.gz
Revert r209544. It papers over a binutils bug, and is not even a reliable
fix for it. The bug occurs when using the --as-needed flag to ld in the presence of synthetic linker-generated symbols that reference symbols defined in linked-to shared libraries with versioned symbols. When the only symbols used from a library fall into this category, ld will drop the DT_NEEDED entry for it, but retain the versioning information. This bug is best fixed/hacked around in binutils, not in rtld. Discussed with: kan
Diffstat (limited to 'libexec/rtld-elf/rtld.c')
-rw-r--r--libexec/rtld-elf/rtld.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index 0e7b122..8082656 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))
OpenPOWER on IntegriCloud