From patchwork Tue Mar 25 18:08:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 276 X-Patchwork-Delegate: azanella@linux.vnet.ibm.com Return-Path: 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 ; 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 ; 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: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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 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> 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 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? 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)