From owner-svn-src-projects@FreeBSD.ORG Sat Jan 15 00:12:52 2011 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B35E106566C; Sat, 15 Jan 2011 00:12:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF22E8FC18; Sat, 15 Jan 2011 00:12:51 +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 p0F0CpbV006705; Sat, 15 Jan 2011 00:12:51 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0F0Cpak006703; Sat, 15 Jan 2011 00:12:51 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201101150012.p0F0Cpak006703@svn.freebsd.org> From: Dimitry Andric Date: Sat, 15 Jan 2011 00:12:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217433 - projects/binutils-2.17/contrib/binutils/bfd X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jan 2011 00:12:52 -0000 Author: dim Date: Sat Jan 15 00:12:51 2011 New Revision: 217433 URL: http://svn.freebsd.org/changeset/base/217433 Log: Backport the second part of the fix for binutils PR ld/4424, which fixes an error in elf_i386_relocate_section, when building the VirtualBox port on i386. The port now builds to completion on i386. A similar amd64 error was already fixed in r217232, but the port does not build to completion there yet, because of another issue. Modified: projects/binutils-2.17/contrib/binutils/bfd/elflink.c Modified: projects/binutils-2.17/contrib/binutils/bfd/elflink.c ============================================================================== --- projects/binutils-2.17/contrib/binutils/bfd/elflink.c Fri Jan 14 23:30:35 2011 (r217432) +++ projects/binutils-2.17/contrib/binutils/bfd/elflink.c Sat Jan 15 00:12:51 2011 (r217433) @@ -858,9 +858,11 @@ _bfd_elf_merge_symbol (bfd *abfd, return FALSE; *sym_hash = h; + bed = get_elf_backend_data (abfd); + /* This code is for coping with dynamic objects, and is only useful if we are doing an ELF link. */ - if (info->hash->creator != abfd->xvec) + if (!(*bed->relocs_compatible) (abfd->xvec, info->hash->creator)) return TRUE; /* For merging, we only care about real symbols. */ @@ -947,7 +949,6 @@ _bfd_elf_merge_symbol (bfd *abfd, && h->root.type != bfd_link_hash_undefweak && h->root.type != bfd_link_hash_common); - bed = get_elf_backend_data (abfd); /* When we try to create a default indirect symbol from the dynamic definition with the default version, we skip it if its type and the type of existing regular definition mismatch. We only do it