From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62732 invoked by alias); 4 May 2015 17:42:24 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 62723 invoked by uid 89); 4 May 2015 17:42:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 04 May 2015 17:42:22 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 6723791E82; Mon, 4 May 2015 17:42:21 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-143.phx2.redhat.com [10.3.113.143]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t44HgKKC015636; Mon, 4 May 2015 13:42:20 -0400 Message-ID: <5547AF7C.9030500@redhat.com> Date: Mon, 04 May 2015 17:42:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Jakub Jelinek CC: Alexander Monakov , gcc-patches@gcc.gnu.org, Rich Felker Subject: Re: [PATCH] Expand PIC calls without PLT with -fno-plt References: <1430757479-14241-1-git-send-email-amonakov@ispras.ru> <1430757479-14241-6-git-send-email-amonakov@ispras.ru> <5547AD8D.9080806@redhat.com> <20150504173955.GE1751@tucnak.redhat.com> In-Reply-To: <20150504173955.GE1751@tucnak.redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00243.txt.bz2 On 05/04/2015 11:39 AM, Jakub Jelinek wrote: > On Mon, May 04, 2015 at 11:34:05AM -0600, Jeff Law wrote: >> On 05/04/2015 10:37 AM, Alexander Monakov wrote: >>> This patch introduces option -fno-plt that allows to expand calls that would >>> go via PLT to load the address of the function immediately at call site (which >>> introduces a GOT load). Cover letter explains the motivation for this patch. >>> >>> New option documentation for invoke.texi is missing from the patch; if this is >>> accepted I'll be happy to send a v2 with documentation added. >>> >>> * calls.c (prepare_call_address): Transform PLT call to GOT lookup and >>> indirect call by forcing address into a pseudo with -fno-plt. >>> * common.opt (flag_plt): New option. >> OK once you cobble together the invoke.texi changes. > > Isn't what Michael/Alan suggested better? I mean as/ld/compiler changes to > inline the plt slot's first part, then lazy binding will work fine. I must have missed Alan/Michael's message. ISTM the win here is that by going through the GOT, you can CSE the GOT reference and possibly get some more register allocation freedom. Is that still the case with Alan/Michael's approach? jeff