From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74689 invoked by alias); 21 May 2015 22:02:30 -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 74677 invoked by uid 89); 21 May 2015 22:02:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-vn0-f54.google.com Received: from mail-vn0-f54.google.com (HELO mail-vn0-f54.google.com) (209.85.216.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 21 May 2015 22:02:28 +0000 Received: by vnbg129 with SMTP id g129so62718vnb.9 for ; Thu, 21 May 2015 15:02:25 -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=oSnoNCawNcELpyP3sWK+0u0wQmSOJV5yxZSKjCyHqSg=; b=W6EdRl3qWWpXFeL0qy7N0VmXwPs9YHgWNyOBB3wJoHTWZjdMKWpZrwHlBSPZgE8cmU Mv5OMZWbq89ZDnccDRQU5COJMmvdpZuzXokjPj7HK8eljGCoaRK4vbgW/8vTvVs/JPCp rlqyrLXh14T7DS4Q4fvKJlzikXT8fH+rU522wqhI/SnxpWGWK7VxqE1sxWEpk/7oj8EI e4mqASMgPROQk2sCbKE1EjqOYkj5p/vNOxV8HzreVm2jCyiSq9LUSKqU7VgtIB07ggEY qrQdf2BXIYK3/5Q3XDXhbq61eB630q2vMtY1FWWsrsuLz8e4Jko8aV40ymJkf601MC9L RwNg== X-Gm-Message-State: ALoCoQkKRUqtfmkSgZ9nkr7BW44IuqJpQVgLQ2rxMRt2UAs/7A7pxEv14DX2EwnBxzkyLdP8f1RK MIME-Version: 1.0 X-Received: by 10.52.231.102 with SMTP id tf6mr4248735vdc.47.1432245745755; Thu, 21 May 2015 15:02:25 -0700 (PDT) Received: by 10.52.229.196 with HTTP; Thu, 21 May 2015 15:02:25 -0700 (PDT) In-Reply-To: <555E5376.3060706@redhat.com> References: <555E5376.3060706@redhat.com> Date: Thu, 21 May 2015 22: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: Pedro Alves Cc: "H.J. Lu" , Michael Matz , David Li , GCC Patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg02051.txt.bz2 On Thu, May 21, 2015 at 2:51 PM, Pedro Alves wrote: > On 05/21/2015 10:12 PM, Sriraman Tallam wrote: >> >> My original proposal, for x86_64 only, was to add >> -fno-plt=. This lets the user decide for which >> functions PLT must be avoided. Let the compiler always generate an >> indirect call using call *func@GOTPCREL(%rip). We could do this for >> non-PIC code too. No need for linker fixups since this relies on the >> user to know that func is from a shared object. > > Having to pass function names on the command line seems like an odd > interface. E.g, you'll need to pass the mangled name for > C++ functions. Any reason this isn't a function attribute? It is not clear to me where I would stick the attribute. Example usage in foo.cc: #include int main() { int n = memcmp(....); } I want memcmp to not go through PLT, do you propose explicitly re-declaring it in foo.cc with the attribute? Thanks Sri > > Thanks, > Pedro Alves >