linux-mips
[Top] [All Lists]

Re: [Patch]: Fix ld pr11138 FAILures on mips*.

To: David Daney <david.daney@cavium.com>
Subject: Re: [Patch]: Fix ld pr11138 FAILures on mips*.
From: Alan Modra <amodra@gmail.com>
Date: Tue, 6 Dec 2011 16:10:19 +1030
Cc: binutils <binutils@sourceware.org>, linux-mips <linux-mips@linux-mips.org>, Manuel Lauss <manuel.lauss@googlemail.com>, Debian MIPS <debian-mips@lists.debian.org>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=v1etU3VmvQqtrxXpPwwvz5vnrxajMJQSBIC6pSlOdms=; b=JA0FGJ+BF9ARc5CreuSEn5DMh/DN62UNFD43ek3+3BQoO46zaMobEHLSnnCPoOnjo3 BEhUzBYEHJs07sWsCCYjgx4gB40vYl3uRVM4U1OF+MvHQaH39HR1+W/69tt4c/K0KKVN I9GBmVba8RpcMFFQ3tUyvai3g7yAHVG1Zd00s=
In-reply-to: <4EDD669F.30207@cavium.com>
Mail-followup-to: David Daney <david.daney@cavium.com>, binutils <binutils@sourceware.org>, linux-mips <linux-mips@linux-mips.org>, Manuel Lauss <manuel.lauss@googlemail.com>, Debian MIPS <debian-mips@lists.debian.org>
References: <4EDD669F.30207@cavium.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.20 (2009-06-14)
On Mon, Dec 05, 2011 at 04:49:35PM -0800, David Daney wrote:
> The root cause of this is that the mips linker synthesizes a special
> symbol "__RLD_MAP", and then sets MIPS_RLD_MAP to point to it.  When
> a version script is present, this symbol gets versioned along with
> all the rest, and when it is time to take its address, the symbol
> can no longer be found as it has had version information appended to
> its name.

Why not just change

          && (strcmp (name, "__rld_map") == 0
              || strcmp (name, "__RLD_MAP") == 0))

to

          && (strncmp (name, "__rld_map", 9) == 0
              || strncmp (name, "__RLD_MAP", 9) == 0))

in _bfd_mips_elf_finish_dynamic_symbol?  Perhaps the same for other
syms there too?

-- 
Alan Modra
Australia Development Lab, IBM

<Prev in Thread] Current Thread [Next in Thread>