From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50334 invoked by alias); 4 Jun 2015 21:17:10 -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 50307 invoked by uid 89); 4 Jun 2015 21:17:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.6 required=5.0 tests=AWL,BAYES_50,KAM_STOCKGEN,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mail-vn0-f51.google.com Received: from mail-vn0-f51.google.com (HELO mail-vn0-f51.google.com) (209.85.216.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 04 Jun 2015 21:17:09 +0000 Received: by vnbf1 with SMTP id f1so6762171vnb.6 for ; Thu, 04 Jun 2015 14:17:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=0f1ne9RbHpGCU2VHnaB+7uhD1thDvwEP1jg7bHmRHWQ=; b=iHKED8PQFX1J7jqhCy79EMLMwu0Yux9+GgHyURMdSK1hGjE1QfDojfFLHzqZJkzU0o qn0UyA+eBO13THOEy03w41AzKTSbi+8VCg9G/0EfwhBstZAzsLk6iQhuDHpHWLRm/65G q0k4YnkyVZR8u1xuiW/ovW0snhPyi6Ok3wY4JCv5bXNggnkzJVoJk4VbTgh6HKrZpLzx 1OALw0DhpF07Iofxg2b+GzCSgbr20ulLBJJ/F3cf1r+Rcw6sevwxbK1utmoTQMmOkyto Io9usUG/zUU0vZVtq/KO7GzdMXUuRMt77nkHk2IQtJJ0CLp2b0T3ZNjsDe3hHrNamvDc 4Rsw== X-Gm-Message-State: ALoCoQn0U8BiQygk3lHV3SM/t5ZBrqFED4922jJoy2WZQd4He1gi5MG4rcSuiFYxXCqNporUFgfr MIME-Version: 1.0 X-Received: by 10.52.240.198 with SMTP id wc6mr92118vdc.34.1433452626813; Thu, 04 Jun 2015 14:17:06 -0700 (PDT) Received: by 10.52.231.35 with HTTP; Thu, 4 Jun 2015 14:17:06 -0700 (PDT) In-Reply-To: <55708543.70904@redhat.com> References: <556C16B1.5080606@arm.com> <556F5F04.80603@redhat.com> <55708543.70904@redhat.com> Date: Thu, 04 Jun 2015 21:34:00 -0000 Message-ID: Subject: Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt= From: Sriraman Tallam To: Richard Henderson Cc: Ramana Radhakrishnan , Jan Hubicka , "H.J. Lu" , Pedro Alves , Michael Matz , David Li , GCC Patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00439.txt.bz2 On Thu, Jun 4, 2015 at 10:05 AM, Richard Henderson wrote: > On 06/04/2015 09:54 AM, Sriraman Tallam wrote: >> + DECL_ATTRIBUTES (SYMBOL_REF_DECL (XEXP(fnaddr, 0))))) > > Spacing. > >> { >> use_reg (&use, gen_rtx_REG (Pmode, REAL_PIC_OFFSET_TABLE_REGNUM)); >> if (ix86_use_pseudo_pic_reg ()) >> @@ -25598,7 +25603,31 @@ ix86_expand_call (rtx retval, rtx fnaddr, rtx call >> >> return call; >> } >> +/* Return true if the function being called was marked with attribute "noplt" > > Vertical spacing. > >> + || !TARGET_64BIT || TARGET_MACHO|| TARGET_SEH || TARGET_PECOFF > > Spacing. > > Otherwise ok. Made these changes and committed the patch. I had to add one more check here to check if decl is not null before looking at its attributes. It was causing a seg fault during boot-strap with libgcc build. + && (SYMBOL_REF_DECL ((XEXP (fnaddr, 0))) == NULL_TREE // This line was added after the patch was approved. + || !lookup_attribute ("noplt", + DECL_ATTRIBUTES (SYMBOL_REF_DECL (XEXP (fnaddr, 0)))))) Thanks Sri > > > r~