From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 10 Dec 2011 01:50:08 +0100 (CET) Received: from mail3.caviumnetworks.com ([12.108.191.235]:7120 "EHLO mail3.caviumnetworks.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S1903738Ab1LJAuD (ORCPT ); Sat, 10 Dec 2011 01:50:03 +0100 Received: from caexch01.caveonetworks.com (Not Verified[192.168.16.9]) by mail3.caviumnetworks.com with MailMarshal (v6,7,2,8378) id ; Fri, 09 Dec 2011 16:51:30 -0800 Received: from caexch01.caveonetworks.com ([192.168.16.9]) by caexch01.caveonetworks.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 9 Dec 2011 16:50:01 -0800 Received: from dd1.caveonetworks.com ([64.2.3.195]) by caexch01.caveonetworks.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 9 Dec 2011 16:50:01 -0800 Message-ID: <4EE2ACB9.9010301@cavium.com> Date: Fri, 09 Dec 2011 16:50:01 -0800 From: David Daney User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Thunderbird/3.0.10 MIME-Version: 1.0 To: binutils , Richard Sandiford , Alan Modra CC: Manuel Lauss , Debian MIPS , linux-mips Subject: Re: [Patch v2]: Fix ld pr11138 FAILures on mips*. References: <4EE27012.5030508@cavium.com> <20111210003928.GC2461@bubble.grove.modra.org> In-Reply-To: <20111210003928.GC2461@bubble.grove.modra.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 10 Dec 2011 00:50:01.0311 (UTC) FILETIME=[A5D0B6F0:01CCB6D5] X-archive-position: 32081 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: david.daney@cavium.com Precedence: bulk X-list: linux-mips Return-Path: X-Keywords: X-UID: 8203 Thanks Alan, I will wait a couple of days to give Richard a chance to object. I think I got the address calculation correct, but having another pair of eyes look at it would be nice. I am especially concerned about what happens on IRIX where the symbol comes in from an external object rather than being generated by the linker itself. I had no way to test that. David Daney On 12/09/2011 04:39 PM, Alan Modra wrote: > On Fri, Dec 09, 2011 at 12:31:14PM -0800, David Daney wrote: >> * /elfxx-mips.c (mips_elf_link_hash_table.rld_value): Remove. >> (mips_elf_link_hash_table.rld_symbol): New field; >> (MIPS_ELF_RLD_MAP_SIZE): New macro. >> (_bfd_mips_elf_add_symbol_hook): Remember __rld_obj_head symbol >> in rld_symbol. >> (_bfd_mips_elf_create_dynamic_sections): Remember __rld_map symbol >> in rld_symbol. >> (_bfd_mips_elf_size_dynamic_sections): Set correct size for .rld_map. >> (_bfd_mips_elf_finish_dynamic_symbol): Remove .rld_map handling. >> (_bfd_mips_elf_finish_dynamic_sections): Use rld_symbol to >> calculate DT_MIPS_RLD_MAP value. >> (_bfd_mips_elf_link_hash_table_create): Initialize rld_symbol, >> quit initializing rld_value. > > OK. Remove stray / in ChangeLog entry Yes, I noticed that only after hitting Send. > >> + s->size += MIPS_ELF_RLD_MAP_SIZE(output_bfd); > > Fix formatting here. > >> + dyn.d_un.d_ptr = s->output_section->vma + s->output_offset >> + + h->root.u.def.value; > > And it's nice to write code that emacs auto-indent won't change, so > add parentheses > > dyn.d_un.d_ptr = (s->output_section->vma + s->output_offset > + h->root.u.def.value); > I will fix those too.