From owner-svn-src-all@FreeBSD.ORG Mon Jun 28 01:40:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE4BF106564A; Mon, 28 Jun 2010 01:40:56 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDAAE8FC0A; Mon, 28 Jun 2010 01:40:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5S1euTh058563; Mon, 28 Jun 2010 01:40:56 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5S1euB9058561; Mon, 28 Jun 2010 01:40:56 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201006280140.o5S1euB9058561@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 28 Jun 2010 01:40:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209558 - head/libexec/rtld-elf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 01:40:57 -0000 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))