Message ID | 5331C60E.3020605@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | Not applicable |
Delegated to: | Adhemerval Zanella Netto |
Headers |
Return-Path: <x14307373@homiemail-mx20.g.dreamhost.com> X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx20.g.dreamhost.com (caibbdcaaahc.dreamhost.com [208.113.200.72]) by wilcox.dreamhost.com (Postfix) with ESMTP id 654263600A9 for <siddhesh@wilcox.dreamhost.com>; Tue, 25 Mar 2014 11:08:30 -0700 (PDT) Received: by homiemail-mx20.g.dreamhost.com (Postfix, from userid 14307373) id 1852B40BF9563; Tue, 25 Mar 2014 11:08:29 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx20.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx20.g.dreamhost.com (Postfix) with ESMTPS id 1174140B46E3F for <glibc@patchwork.siddhesh.in>; Tue, 25 Mar 2014 11:08:28 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; q=dns; s=default; b=xA8r8uhNVSoFwUBCryo3hzVJXeo+OeWOn/yoG7OkRmo MjWJIiB+5V8V3qOEsvmihyzvdMb1bb6RNPD8Ao82NBm+9VypZJLlbWRi2UraOzM0 1P2XI3SaSfdjVzVeuP41RGLwq38diKiaRDUZ24UinieLL+8XCV/TnrL22I3mWGKM = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=default; bh=dSJBVDyCnCkW+laqldpPu5pCenw=; b=LOFYd/XXSBUxc2LDR R7v7Q04/6MdjjY8d9lhTrm7uwrLPXVqxMKigeJpQQh7EIJdCehzv+PyYrDB48j5N TOW/J5a6Fbz7Xhd8SFcu6kh4C7o+g6K8eUzGwa+TQo4EvDs9oMgNee6R142fhZ2o wmmYSFt3mXHdogUvywNV6fSUxQ= Received: (qmail 20288 invoked by alias); 25 Mar 2014 18:08:26 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <libc-alpha.sourceware.org> List-Unsubscribe: <mailto:libc-alpha-unsubscribe-glibc=patchwork.siddhesh.in@sourceware.org> List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 20269 invoked by uid 89); 25 Mar 2014 18:08:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e24smtp04.br.ibm.com Message-ID: <5331C60E.3020605@linux.vnet.ibm.com> Date: Tue, 25 Mar 2014 15:08:14 -0300 From: Adhemerval Zanella <azanella@linux.vnet.ibm.com> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: libc-alpha@sourceware.org Subject: Re: [PATCH] Fix localplt check for GNU_IFUNC References: <531B63DE.5090803@linux.vnet.ibm.com> <5329E65A.5010703@redhat.com> <5329F9F2.6060900@linux.vnet.ibm.com> <20140321203357.40883744AC@topped-with-meat.com> In-Reply-To: <20140321203357.40883744AC@topped-with-meat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14032518-1820-0000-0000-00000030DBFE X-DH-Original-To: glibc@patchwork.siddhesh.in |
Commit Message
Adhemerval Zanella Netto
March 25, 2014, 6:08 p.m. UTC
On 21-03-2014 17:33, Roland McGrath wrote: > You need to double-check back to the oldest binutils version that we > support for building libc (>=2.20) that had STT_GNU_IFUNC support (from > NEWS looks like 2.20 itself did have it) to ensure that the script handles > the output from the readelf in all the intervening binutils releases. > If it's verified that the modified script works with all those versions of > readelf, then it looks fine. > I just check against 2.20.1.20101209, 2.21.1.20110925, 2.22.0.20120801, 2.23.2.20130919, and 2.24.0.20140325 'readelf -W -S -d -r' against a x86_64 and PowerPC64 build by generating the jmprel files and all generate the same output for both archs. I also check with wrong IFUNC usage code change on both archs to see if the script is now capable to detect them: * PowerPC64: And both cases all readelf test correctly shows the wrong PLT cases. Ok to commit?
Comments
On 03/25/2014 02:08 PM, Adhemerval Zanella wrote: > On 21-03-2014 17:33, Roland McGrath wrote: >> You need to double-check back to the oldest binutils version that we >> support for building libc (>=2.20) that had STT_GNU_IFUNC support (from >> NEWS looks like 2.20 itself did have it) to ensure that the script handles >> the output from the readelf in all the intervening binutils releases. >> If it's verified that the modified script works with all those versions of >> readelf, then it looks fine. >> > I just check against 2.20.1.20101209, 2.21.1.20110925, 2.22.0.20120801, 2.23.2.20130919, > and 2.24.0.20140325 'readelf -W -S -d -r' against a x86_64 and PowerPC64 build by generating > the jmprel files and all generate the same output for both archs. > > I also check with wrong IFUNC usage code change on both archs to see if the script is now > capable to detect them: > > * PowerPC64: > > diff --git a/sysdeps/powerpc/powerpc64/power7/strncat.S b/sysdeps/powerpc/powerpc64/power7/strncat.S > index 1a1a95e..23861f6 100644 > --- a/sysdeps/powerpc/powerpc64/power7/strncat.S > +++ b/sysdeps/powerpc/powerpc64/power7/strncat.S > @@ -69,7 +69,7 @@ EALIGN(STRNCAT, 4, 0) > beq cr0,L(done) > > mr r31, r4 /* Save "s2" in r31 from r4. */ > - bl STRLEN /* Call optimized strlen on s1; goto > + bl strlen /* Call optimized strlen on s1; goto > end of s1. */ > nop > cmpldi cr7, r29, 7 /* If s2 is <=7 process > > * X86_64: > > diff --git a/sysdeps/x86_64/multiarch/strcat-ssse3.S b/sysdeps/x86_64/multiarch/strcat-ssse3.S > index fde7b90..98fd69c 100644 > --- a/sysdeps/x86_64/multiarch/strcat-ssse3.S > +++ b/sysdeps/x86_64/multiarch/strcat-ssse3.S > @@ -37,6 +37,8 @@ ENTRY (STRCAT) > /* Inline corresponding strlen file, temporary until new strcpy > implementation gets merged. */ > > + call strstr > + > xor %eax, %eax > cmpb $0, (%rdi) > jz L(exit_tail0) > > And both cases all readelf test correctly shows the wrong PLT cases. Ok to commit? Looks good to me. Thanks for the additional manual testing. Cheers, Carlos.
On 25-03-2014 15:13, Carlos O'Donell wrote: > On 03/25/2014 02:08 PM, Adhemerval Zanella wrote: >> On 21-03-2014 17:33, Roland McGrath wrote: >>> You need to double-check back to the oldest binutils version that we >>> support for building libc (>=2.20) that had STT_GNU_IFUNC support (from >>> NEWS looks like 2.20 itself did have it) to ensure that the script handles >>> the output from the readelf in all the intervening binutils releases. >>> If it's verified that the modified script works with all those versions of >>> readelf, then it looks fine. >>> >> I just check against 2.20.1.20101209, 2.21.1.20110925, 2.22.0.20120801, 2.23.2.20130919, >> and 2.24.0.20140325 'readelf -W -S -d -r' against a x86_64 and PowerPC64 build by generating >> the jmprel files and all generate the same output for both archs. >> >> I also check with wrong IFUNC usage code change on both archs to see if the script is now >> capable to detect them: >> >> * PowerPC64: >> >> diff --git a/sysdeps/powerpc/powerpc64/power7/strncat.S b/sysdeps/powerpc/powerpc64/power7/strncat.S >> index 1a1a95e..23861f6 100644 >> --- a/sysdeps/powerpc/powerpc64/power7/strncat.S >> +++ b/sysdeps/powerpc/powerpc64/power7/strncat.S >> @@ -69,7 +69,7 @@ EALIGN(STRNCAT, 4, 0) >> beq cr0,L(done) >> >> mr r31, r4 /* Save "s2" in r31 from r4. */ >> - bl STRLEN /* Call optimized strlen on s1; goto >> + bl strlen /* Call optimized strlen on s1; goto >> end of s1. */ >> nop >> cmpldi cr7, r29, 7 /* If s2 is <=7 process >> >> * X86_64: >> >> diff --git a/sysdeps/x86_64/multiarch/strcat-ssse3.S b/sysdeps/x86_64/multiarch/strcat-ssse3.S >> index fde7b90..98fd69c 100644 >> --- a/sysdeps/x86_64/multiarch/strcat-ssse3.S >> +++ b/sysdeps/x86_64/multiarch/strcat-ssse3.S >> @@ -37,6 +37,8 @@ ENTRY (STRCAT) >> /* Inline corresponding strlen file, temporary until new strcpy >> implementation gets merged. */ >> >> + call strstr >> + >> xor %eax, %eax >> cmpb $0, (%rdi) >> jz L(exit_tail0) >> >> And both cases all readelf test correctly shows the wrong PLT cases. Ok to commit? > Looks good to me. Thanks for the additional manual testing. > > Cheers, > Carlos. > Pushed as 7bc5a74162d044cc227b38ebf24e2d1d4594ecb8
diff --git a/sysdeps/powerpc/powerpc64/power7/strncat.S b/sysdeps/powerpc/powerpc64/power7/strncat.S index 1a1a95e..23861f6 100644 --- a/sysdeps/powerpc/powerpc64/power7/strncat.S +++ b/sysdeps/powerpc/powerpc64/power7/strncat.S @@ -69,7 +69,7 @@ EALIGN(STRNCAT, 4, 0) beq cr0,L(done) mr r31, r4 /* Save "s2" in r31 from r4. */ - bl STRLEN /* Call optimized strlen on s1; goto + bl strlen /* Call optimized strlen on s1; goto end of s1. */ nop cmpldi cr7, r29, 7 /* If s2 is <=7 process * X86_64: diff --git a/sysdeps/x86_64/multiarch/strcat-ssse3.S b/sysdeps/x86_64/multiarch/strcat-ssse3.S index fde7b90..98fd69c 100644 --- a/sysdeps/x86_64/multiarch/strcat-ssse3.S +++ b/sysdeps/x86_64/multiarch/strcat-ssse3.S @@ -37,6 +37,8 @@ ENTRY (STRCAT) /* Inline corresponding strlen file, temporary until new strcpy implementation gets merged. */ + call strstr + xor %eax, %eax cmpb $0, (%rdi) jz L(exit_tail0)