From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753174AbcBGAPt (ORCPT ); Sat, 6 Feb 2016 19:15:49 -0500 Received: from hr2.samba.org ([144.76.82.148]:59882 "EHLO hr2.samba.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750948AbcBGAPs (ORCPT ); Sat, 6 Feb 2016 19:15:48 -0500 X-Greylist: delayed 1806 seconds by postgrey-1.27 at vger.kernel.org; Sat, 06 Feb 2016 19:15:47 EST Date: Sun, 7 Feb 2016 10:45:32 +1100 From: Anton Blanchard To: Andreas Schwab Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org, Alan Modra Subject: Re: [PATCH] powerpc: fix dedotify for binutils >= 2.26 Message-ID: <20160207104532.51e110ac@kryten> In-Reply-To: <87bn7vm1pg.fsf@linux-m68k.org> References: <87bn7vm1pg.fsf@linux-m68k.org> X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Since binutils 2.26 BFD is doing suffix merging on STRTAB sections. > But dedotify modifies the symbol names in place, which can also modify > unrelated symbols with a name that matches a suffix of a dotted > name. To remove the leading dot of a symbol name we can just > increment the pointer into the STRTAB section instead. Thanks Andreas. > Signed-off-by: Andreas Schwab I think we should get it into stable too. Anton > --- > arch/powerpc/kernel/module_64.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/powerpc/kernel/module_64.c > b/arch/powerpc/kernel/module_64.c index ac64ffd..08b7a40 100644 > --- a/arch/powerpc/kernel/module_64.c > +++ b/arch/powerpc/kernel/module_64.c > @@ -340,7 +340,7 @@ static void dedotify(Elf64_Sym *syms, unsigned > int numsyms, char *strtab) if (name[0] == '.') { > if (strcmp(name+1, "TOC.") == 0) > syms[i].st_shndx = SHN_ABS; > - memmove(name, name+1, strlen(name)); > + syms[i].st_name++; > } > } > }