From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16907 invoked by alias); 1 Feb 2005 23:57:45 -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 16701 invoked from network); 1 Feb 2005 23:57:33 -0000 Received: from unknown (HELO gizmo09ps.bigpond.com) (144.140.71.19) by sourceware.org with SMTP; 1 Feb 2005 23:57:33 -0000 Received: (qmail 9463 invoked from network); 1 Feb 2005 23:57:31 -0000 Received: from unknown (HELO psmam12.bigpond.com) (144.135.25.103) by gizmo09ps.bigpond.com with SMTP; 1 Feb 2005 23:57:31 -0000 Received: from cpe-144-136-221-26.sa.bigpond.net.au ([144.136.221.26]) by psmam12.bigpond.com(MAM REL_3_4_2a 234/55726289) with SMTP id 55726289; Wed, 02 Feb 2005 09:57:31 +1000 Received: by bubble.modra.org (Postfix, from userid 500) id 4BBB817A480; Wed, 2 Feb 2005 10:27:01 +1030 Date: Tue, 01 Feb 2005 23:57:00 -0000 From: Alan Modra To: "H. J. Lu" Cc: binutils@sources.redhat.com Subject: Re: IA64 linker is totally broken (Re: PATCH: ELF linker is broken) Message-ID: <20050201235701.GT11595@bubble.modra.org> Mail-Followup-To: "H. J. Lu" , binutils@sources.redhat.com References: <20050130192249.GA21997@lucon.org> <20050131000227.GF11595@bubble.modra.org> <20050131071308.GH11595@bubble.modra.org> <20050131212203.GA27701@lucon.org> <20050131220214.GA28324@lucon.org> <20050201000825.GK11595@bubble.modra.org> <20050201055618.GA5203@lucon.org> <20050201061826.GA5603@lucon.org> <20050201071606.GQ11595@bubble.modra.org> <20050201224550.GA19843@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050201224550.GA19843@lucon.org> User-Agent: Mutt/1.4i X-SW-Source: 2005-02/txt/msg00040.txt.bz2 On Tue, Feb 01, 2005 at 02:45:50PM -0800, H. J. Lu wrote: > There are quite a few failures on ia64. I am not sure if they can be > fixed by a single change. I am enclosing the cause of all the problems > I have seen so far on ia64. IA64 linker has a relaxation pass, which > seems to be the problem. Dos it ring a bell to you? If not, I will > send you a bunch of ia64 binaries as a testcase. Please send me the binaries! I can only make wild guesses otherwise. BTW, I still can't send email to you directly. Your anti-spam filters don't like my ISP's mail hub, nor do they like smtp directly from my dynamic ip address. :-( Hmm, a bounce through gcc.gnu.org might work. > @@ -4031,6 +4094,18 @@ elf_link_add_object_symbols (bfd *abfd, > free (isymbuf); > isymbuf = NULL; > > + if (!add_needed) You might also try changing this condition to if (!add_needed && (elf_dyn_lib_class (abfd) & DYN_AS_NEEDED) != 0) As it was, we would remove symbols from DT_NEEDED libraries, which is possibly what is breaking ia64. The intention here was just to remove symbols from as-needed libs that weren't referenced anywhere from regular object. I'll commit this change. > + { > + struct elf_smash_syms_data inf; > + inf.not_needed = abfd; > + inf.htab = hash_table; > + inf.twiddled = FALSE; > + elf_link_hash_traverse (hash_table, elf_smash_syms, &inf); > + if (inf.twiddled) > + bfd_link_repair_undef_list (&hash_table->root); > + weaks = NULL; > + } > + > /* Now set the weakdefs field correctly for all the weak defined > symbols we found. The only way to do this is to search all the > symbols. Since we only need the information for non functions in -- Alan Modra IBM OzLabs - Linux Technology Centre