Author: nwhitehorn
Date: Mon Jun 28 01:40:56 2010
New Revision: 209558
URL: http://svn.freebsd.org/changeset/base/209558

Log:
  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

Modified:
  head/libexec/rtld-elf/rtld.c

Modified: head/libexec/rtld-elf/rtld.c
==============================================================================
--- head/libexec/rtld-elf/rtld.c        Mon Jun 28 01:36:22 2010        
(r209557)
+++ head/libexec/rtld-elf/rtld.c        Mon Jun 28 01:40:56 2010        
(r209558)
@@ -3443,13 +3443,9 @@ locate_dependency(const Obj_Entry *obj, 
        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 *o
     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))
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to