From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27899 invoked by alias); 9 May 2005 22:09:37 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 26953 invoked from network); 9 May 2005 22:09:18 -0000 Received: from unknown (HELO sccrmhc11.comcast.net) (204.127.202.55) by sourceware.org with SMTP; 9 May 2005 22:09:18 -0000 Received: from lucon.org ([24.6.212.230]) by comcast.net (sccrmhc11) with ESMTP id <20050509220918011000ng9le>; Mon, 9 May 2005 22:09:18 +0000 Received: by lucon.org (Postfix, from userid 1000) id 366EA649BC; Mon, 9 May 2005 15:09:17 -0700 (PDT) Date: Mon, 09 May 2005 22:35:00 -0000 From: "H. J. Lu" To: binutils@sources.redhat.com Subject: Re: PATCH: PR 939: Assertion failed in linker Message-ID: <20050509220917.GA13515@lucon.org> References: <20050508001312.GA14292@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050508001312.GA14292@lucon.org> User-Agent: Mutt/1.4.1i X-SW-Source: 2005-05/txt/msg00355.txt.bz2 On Sat, May 07, 2005 at 05:13:12PM -0700, H. J. Lu wrote: > We make those array symbols hidden now. But some broken DSOs references > them. When we reporting error, we get > > g++ --export-dynamic -o > /home/janoc/src/VHD/VHDPP_TEST/bin/vhdMetaEngine > vhdMetaEngine/vhdWinApp.o -L/home/janoc/src/VHD/VHDPP_TEST/lib > -L/usr/lib/qt3/lib -L/opt/jtc2.0/lib -L/opt/xerces-1.5.2/lib > -L/usr/X11R6/lib -lDynLib -lvhdMath -lvhdKernel -lvhdQManager -lDynLib > -lvhdOmniORB -lxerces-c -lJTC -ldl -lomniORB4 > collect2: ld terminated with signal 11 [Segmentation fault] > /usr/bin/ld: BFD 2.16.90.0.2 20050429 assertion fail elflink.c:6191 > > since we don't check if a symbol is defined in ABS section. This patch > changes it to > > /usr/gcc-4.0/bin/g++ -B./ -o vhdMetaEngine vhdWinApp.o > -Wl,-rpath-link,usr/lib -Llib -lDynLib -lvhdMath -lvhdKernel > -lvhdQManager -lDynLib -lvhdOmniORB -lxerces-c -lJTC -ldl -lomniORB4 > ./ld: BFD 2.16.90.0.3 20050507 assertion fail > /net/gnu/export/linux/src/binutils/binutils/bfd/elflink.c:6301 > ./ld: vhdMetaEngine: hidden symbol `__fini_array_end' in vhdMetaEngine > is referenced by DSO > ./ld: final link failed: Nonrepresentable section on output > collect2: ld returned 1 exit status > > > H.J. > --- > 2005-05-07 H.J. Lu > > PR 939 > * elflink.c (elf_link_output_extsym): Use output_bfd if > h->root.u.def.section is bfd_abs_section_ptr when reporting > error. > This patch fixes the similar issue in ld. H.J. --- 2005-05-09 H.J. Lu * ldmain.c (reloc_overflow): Use output_bfd if the symbol is defined in the ABS section. --- ld/ldmain.c.abs 2005-05-09 15:06:19.000000000 -0700 +++ ld/ldmain.c 2005-05-09 15:04:03.000000000 -0700 @@ -1452,7 +1452,9 @@ reloc_overflow (struct bfd_link_info *in case bfd_link_hash_defweak: einfo (_(" relocation truncated to fit: %s against symbol `%T' defined in %A section in %B"), reloc_name, entry->root.string, - entry->u.def.section, entry->u.def.section->owner); + entry->u.def.section, + entry->u.def.section == bfd_abs_section_ptr + ? output_bfd : entry->u.def.section->owner); break; default: abort ();